mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Spawn different objects withing level
This commit is contained in:
parent
7434cb66e8
commit
4a4b80bef3
9 changed files with 85 additions and 18 deletions
30
src/objects/Object.h
Normal file
30
src/objects/Object.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef OBJECT_H
|
||||
#define OBJECT_H
|
||||
|
||||
#include "stdlib.h"
|
||||
#include <iostream>
|
||||
|
||||
class Level;
|
||||
|
||||
class Object {
|
||||
private:
|
||||
Level* level;
|
||||
|
||||
public:
|
||||
int64_t objectUID;
|
||||
bool shouldUpdate = true;
|
||||
|
||||
public:
|
||||
virtual ~Object() { destroyed(); }
|
||||
|
||||
public:
|
||||
virtual void spawned() { }
|
||||
virtual void update(float delta) { }
|
||||
virtual void destroyed() { }
|
||||
|
||||
public:
|
||||
Level* getLevel() { return level; }
|
||||
void setLevel(Level* lvl) { level = lvl; }
|
||||
};
|
||||
|
||||
#endif /* OBJECT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue