diff options
Diffstat (limited to 'pacman-c++/actor.h')
| -rw-r--r-- | pacman-c++/actor.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/pacman-c++/actor.h b/pacman-c++/actor.h index 3cee699..d2d7875 100644 --- a/pacman-c++/actor.h +++ b/pacman-c++/actor.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #include "pixmapitem.h" | 4 | #include "pixmapitem.h" |
| 5 | 5 | ||
| 6 | #include "constants.h" | ||
| 7 | |||
| 6 | class Actor | 8 | class Actor |
| 7 | : public PixmapItem | 9 | : public PixmapItem |
| 8 | { | 10 | { |
| @@ -15,18 +17,11 @@ public: | |||
| 15 | Down | 17 | Down |
| 16 | }; | 18 | }; |
| 17 | 19 | ||
| 18 | enum Type { | 20 | Actor(Color color, QGraphicsItem *parent = 0); |
| 19 | Player1 = 1, // red | ||
| 20 | Player2, // blue | ||
| 21 | Player3, // green | ||
| 22 | Player4, // yellow | ||
| 23 | }; | ||
| 24 | |||
| 25 | Actor(Type type, QGraphicsItem *parent = 0); | ||
| 26 | 21 | ||
| 27 | private: | 22 | private: |
| 28 | QPixmap m_pix; | 23 | QPixmap m_pix; |
| 29 | Type m_type; | 24 | Color m_color; |
| 30 | Movement m_direction; | 25 | Movement m_direction; |
| 31 | }; | 26 | }; |
| 32 | 27 | ||
