diff options
Diffstat (limited to 'include/world.h')
-rw-r--r-- | include/world.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/include/world.h b/include/world.h index 85b5370..51fbbfd 100644 --- a/include/world.h +++ b/include/world.h @@ -79,7 +79,8 @@ class World; * The light structure, used to store light coordinates and color. */ -typedef struct { +class Light{ +public: vec2 loc; /**< Light location */ Color color; /**< Light color */ float radius; /**< Light radius */ @@ -91,14 +92,26 @@ typedef struct { float fireFlicker; vec2 fireLoc; - // Light(vec2 l, Color c, float r){ - // loc = l; - // color = c; - // radius = r; - // belongsTo = false; - // following = nullptr; - // } -} Light; + Light(vec2 l, Color c, float r){ + loc = l; + color = c; + radius = r; + + belongsTo = false; + following = nullptr; + + flame = false; + } + + void makeFlame(void){ + flame = true; + } + + void follow(Entity *f){ + following=f; + belongsTo = true; + } +}; /** |