diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-18 15:25:52 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-18 15:25:52 -0500 |
| commit | e4e2f2d2a7b6a282b9618aa0004d9453936f43c6 (patch) | |
| tree | de1653dc8b5992420147f28d9fb4de052ea1845f /src/components/playable.h | |
| parent | e16fb5be90c889c371cbb0ca2444735c2e12073c (diff) | |
| download | therapy-e4e2f2d2a7b6a282b9618aa0004d9453936f43c6.tar.gz therapy-e4e2f2d2a7b6a282b9618aa0004d9453936f43c6.tar.bz2 therapy-e4e2f2d2a7b6a282b9618aa0004d9453936f43c6.zip | |
Added player death and event scheduling
Also added ability to make sprites flicker, to freeze physics for an entity, and to freeze progression of a sprite's animation loop.
Diffstat (limited to 'src/components/playable.h')
| -rw-r--r-- | src/components/playable.h | 9 |
1 files changed, 9 insertions, 0 deletions
| diff --git a/src/components/playable.h b/src/components/playable.h index a6e71b0..86a7ee7 100644 --- a/src/components/playable.h +++ b/src/components/playable.h | |||
| @@ -2,14 +2,23 @@ | |||
| 2 | #define PLAYABLE_H_DDC566C3 | 2 | #define PLAYABLE_H_DDC566C3 |
| 3 | 3 | ||
| 4 | #include "component.h" | 4 | #include "component.h" |
| 5 | #include <functional> | ||
| 5 | 6 | ||
| 6 | class PlayableComponent : public Component { | 7 | class PlayableComponent : public Component { |
| 7 | public: | 8 | public: |
| 8 | 9 | ||
| 10 | using MapChangeCallback = std::function<void()>; | ||
| 11 | |||
| 9 | bool changingMap = false; | 12 | bool changingMap = false; |
| 10 | int newMapId = -1; | 13 | int newMapId = -1; |
| 11 | double newMapX = 0; | 14 | double newMapX = 0; |
| 12 | double newMapY = 0; | 15 | double newMapY = 0; |
| 16 | MapChangeCallback newMapCallback; | ||
| 17 | |||
| 18 | int checkpointMapId = -1; | ||
| 19 | double checkpointX = 0; | ||
| 20 | double checkpointY = 0; | ||
| 21 | |||
| 13 | }; | 22 | }; |
| 14 | 23 | ||
| 15 | #endif /* end of include guard: PLAYABLE_H_DDC566C3 */ | 24 | #endif /* end of include guard: PLAYABLE_H_DDC566C3 */ |
