diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-02-27 23:15:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-27 23:15:52 -0800 |
| commit | 4e10e89cca8484f2729d4adbc8d945bc0e46ad10 (patch) | |
| tree | ca1fdb60456dcb4ab594ce1515622e2c2a674153 /src | |
| parent | b906dcf24b31c87b6ecf6b07be92c930329d1d38 (diff) | |
| parent | 4ffa704eb3920b2cf2613fa879cfd87470d2ef30 (diff) | |
Merge pull request #415 from hatal175/lamp
Diffstat (limited to 'src')
| -rw-r--r-- | src/object/lamp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/object/lamp.c b/src/object/lamp.c new file mode 100644 index 00000000..caf458ad --- /dev/null +++ b/src/object/lamp.c @@ -0,0 +1,23 @@ +#include "entity.h" + +void Lamp_Init(Entity* this); +void Lamp_Action1(Entity* this); + +void Lamp(Entity* this) { + static void (*const actionFuncs[])(Entity*) = { + Lamp_Init, + Lamp_Action1, + }; + + actionFuncs[this->action](this); +} + +void Lamp_Init(Entity* this) { + this->action = 1; + UpdateSpriteForCollisionLayer(this); + InitializeAnimation(this, 0); +} + +void Lamp_Action1(Entity* this) { + GetNextFrame(this); +} |
