summary refs log tree commit diff stats
path: root/src/components.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.h')
-rw-r--r--src/components.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components.h b/src/components.h index c66db47..f5c66d4 100644 --- a/src/components.h +++ b/src/components.h
@@ -100,4 +100,22 @@ class MapCollisionComponent : public Component {
100 const Map& map; 100 const Map& map;
101}; 101};
102 102
103class StaticImageComponent : public Component {
104 public:
105 StaticImageComponent(const char* filename);
106 void render(Game& game, Entity& entity, Texture& buffer);
107
108 private:
109 Texture sprite;
110};
111
112class SimpleColliderComponent : public Component {
113 public:
114 SimpleColliderComponent(std::function<void (Entity& collider)> callback);
115 void receive(Game& game, Entity& entity, const Message& msg);
116
117 private:
118 std::function<void (Entity& collider)> callback;
119};
120
103#endif 121#endif