diff options
| author | manuel <manuel@mausz.at> | 2011-05-05 00:57:07 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-05-05 00:57:07 +0200 |
| commit | ce48af53646cd9e7ec762fc1ac176b3aa620b11d (patch) | |
| tree | f8fbf2cae8c7d0cbac2696a8f4cf94410bfb4928 /pacman-c++/block.h | |
| parent | e54ccad07e256ba877bd41d70bd358bd0085bd1e (diff) | |
| download | foop-ce48af53646cd9e7ec762fc1ac176b3aa620b11d.tar.gz foop-ce48af53646cd9e7ec762fc1ac176b3aa620b11d.tar.bz2 foop-ce48af53646cd9e7ec762fc1ac176b3aa620b11d.zip | |
- refactorized the whole project and made a few subprojects
- replaced tcp with enet
- added connect dialog
- some smaller bugfixes
Diffstat (limited to 'pacman-c++/block.h')
| -rw-r--r-- | pacman-c++/block.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/pacman-c++/block.h b/pacman-c++/block.h deleted file mode 100644 index abfbc5a..0000000 --- a/pacman-c++/block.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | #ifndef BLOCK_H | ||
| 2 | #define BLOCK_H | ||
| 3 | |||
| 4 | #include "gameentity.h" | ||
| 5 | #include "constants.h" | ||
| 6 | #include <QMap> | ||
| 7 | |||
| 8 | class Block | ||
| 9 | : public GameEntity | ||
| 10 | { | ||
| 11 | public: | ||
| 12 | enum Neighbour | ||
| 13 | { | ||
| 14 | None = 0, | ||
| 15 | Left = (1 << 0), | ||
| 16 | Right = (1 << 1), | ||
| 17 | Up = (1 << 2), | ||
| 18 | Down = (1 << 3) | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum | ||
| 22 | { | ||
| 23 | Type = UserType + Transmission::block | ||
| 24 | }; | ||
| 25 | |||
| 26 | public: | ||
| 27 | Block(Color::Color color, unsigned int neighbours = None, QGraphicsItem *parent = 0); | ||
| 28 | virtual ~Block() | ||
| 29 | {}; | ||
| 30 | |||
| 31 | unsigned int neighbours(); | ||
| 32 | void setNeighbours(unsigned int neighbours); | ||
| 33 | virtual bool checkEnter(Actor *actor); | ||
| 34 | virtual EnteredState enter(Actor *actor); | ||
| 35 | virtual void onDie(Actor *); | ||
| 36 | |||
| 37 | private: | ||
| 38 | // map for saving QPixmaps for reuse | ||
| 39 | static QMap<Color::Color, QPixmap> m_pixmaps; | ||
| 40 | unsigned int m_neighbours; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif // BLOCK_H | ||
