diff options
Diffstat (limited to 'src/components/orientable.h')
| -rw-r--r-- | src/components/orientable.h | 24 |
1 files changed, 24 insertions, 0 deletions
| diff --git a/src/components/orientable.h b/src/components/orientable.h new file mode 100644 index 0000000..8f56912 --- /dev/null +++ b/src/components/orientable.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #ifndef ORIENTABLE_H_EDB6C4A1 | ||
| 2 | #define ORIENTABLE_H_EDB6C4A1 | ||
| 3 | |||
| 4 | #include "component.h" | ||
| 5 | |||
| 6 | class OrientableComponent : public Component { | ||
| 7 | public: | ||
| 8 | |||
| 9 | inline bool isFacingRight() const | ||
| 10 | { | ||
| 11 | return facingRight_; | ||
| 12 | } | ||
| 13 | |||
| 14 | inline void setFacingRight(bool v) | ||
| 15 | { | ||
| 16 | facingRight_ = v; | ||
| 17 | } | ||
| 18 | |||
| 19 | private: | ||
| 20 | |||
| 21 | bool facingRight_ = false; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif /* end of include guard: ORIENTABLE_H_EDB6C4A1 */ | ||
