diff options
Diffstat (limited to 'src/components/ponderable.h')
| -rw-r--r-- | src/components/ponderable.h | 17 |
1 files changed, 5 insertions, 12 deletions
| diff --git a/src/components/ponderable.h b/src/components/ponderable.h index ac759b6..e21cbab 100644 --- a/src/components/ponderable.h +++ b/src/components/ponderable.h | |||
| @@ -11,13 +11,6 @@ public: | |||
| 11 | freefalling | 11 | freefalling |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | enum class State { | ||
| 15 | grounded, | ||
| 16 | jumping, | ||
| 17 | falling, | ||
| 18 | dropping | ||
| 19 | }; | ||
| 20 | |||
| 21 | PonderableComponent(Type type) : type_(type) | 14 | PonderableComponent(Type type) : type_(type) |
| 22 | { | 15 | { |
| 23 | } | 16 | } |
| @@ -67,14 +60,14 @@ public: | |||
| 67 | accelY_ = v; | 60 | accelY_ = v; |
| 68 | } | 61 | } |
| 69 | 62 | ||
| 70 | inline State getState() const | 63 | inline bool isGrounded() const |
| 71 | { | 64 | { |
| 72 | return state_; | 65 | return grounded_; |
| 73 | } | 66 | } |
| 74 | 67 | ||
| 75 | inline void setState(State arg) | 68 | inline void setGrounded(bool v) |
| 76 | { | 69 | { |
| 77 | state_ = arg; | 70 | grounded_ = v; |
| 78 | } | 71 | } |
| 79 | 72 | ||
| 80 | private: | 73 | private: |
| @@ -84,7 +77,7 @@ private: | |||
| 84 | double accelX_ = 0.0; | 77 | double accelX_ = 0.0; |
| 85 | double accelY_ = 0.0; | 78 | double accelY_ = 0.0; |
| 86 | Type type_ = Type::vacuumed; | 79 | Type type_ = Type::vacuumed; |
| 87 | State state_ = State::grounded; | 80 | bool grounded_ = false; |
| 88 | }; | 81 | }; |
| 89 | 82 | ||
| 90 | #endif /* end of include guard: TANGIBLE_H_746DB3EE */ | 83 | #endif /* end of include guard: TANGIBLE_H_746DB3EE */ |
