Setup ecs system scaffolding
This commit is contained in:
+13
-1
@@ -8,7 +8,8 @@
|
||||
|
||||
enum Type { IMAGE,
|
||||
TEXT,
|
||||
RECT };
|
||||
RECT,
|
||||
WORLD };
|
||||
|
||||
enum ClickMode { PASS,
|
||||
BLOCK,
|
||||
@@ -82,6 +83,17 @@ struct ERect : Element {
|
||||
void render(uint64_t) override;
|
||||
};
|
||||
|
||||
struct EWorld : Element {
|
||||
#warning need to implement ecs system first before implementing this
|
||||
uint64_t world_id = UINT64_MAX;
|
||||
|
||||
EWorld(uint64_t world_id) : Element(Type::WORLD), world_id(world_id) {}
|
||||
|
||||
Vec2<float> size() override;
|
||||
|
||||
void render(uint64_t) override;
|
||||
};
|
||||
|
||||
inline Pool<Element> element_pool;
|
||||
} // namespace app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user