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/ponderable.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/ponderable.h')
| -rw-r--r-- | src/components/ponderable.h | 22 |
1 files changed, 22 insertions, 0 deletions
| diff --git a/src/components/ponderable.h b/src/components/ponderable.h index e21cbab..78af25f 100644 --- a/src/components/ponderable.h +++ b/src/components/ponderable.h | |||
| @@ -70,6 +70,26 @@ public: | |||
| 70 | grounded_ = v; | 70 | grounded_ = v; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | inline bool isFrozen() const | ||
| 74 | { | ||
| 75 | return frozen_; | ||
| 76 | } | ||
| 77 | |||
| 78 | inline void setFrozen(bool v) | ||
| 79 | { | ||
| 80 | frozen_ = v; | ||
| 81 | } | ||
| 82 | |||
| 83 | inline bool isCollidable() const | ||
| 84 | { | ||
| 85 | return collidable_; | ||
| 86 | } | ||
| 87 | |||
| 88 | inline void setCollidable(bool v) | ||
| 89 | { | ||
| 90 | collidable_ = v; | ||
| 91 | } | ||
| 92 | |||
| 73 | private: | 93 | private: |
| 74 | 94 | ||
| 75 | double velX_ = 0.0; | 95 | double velX_ = 0.0; |
| @@ -78,6 +98,8 @@ private: | |||
| 78 | double accelY_ = 0.0; | 98 | double accelY_ = 0.0; |
| 79 | Type type_ = Type::vacuumed; | 99 | Type type_ = Type::vacuumed; |
| 80 | bool grounded_ = false; | 100 | bool grounded_ = false; |
| 101 | bool frozen_ = false; | ||
| 102 | bool collidable_ = true; | ||
| 81 | }; | 103 | }; |
| 82 | 104 | ||
| 83 | #endif /* end of include guard: TANGIBLE_H_746DB3EE */ | 105 | #endif /* end of include guard: TANGIBLE_H_746DB3EE */ |
