source: trunk/monsterz/piece.h @ 266

Last change on this file since 266 was 266, checked in by sam, 11 years ago

Add the pop animation frame to disappearing monsterz.

File size: 773 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
4//
5
6//
7// The Piece class
8// ---------------
9//
10
11#if !defined __DH_PIECE_H__
12#define __DH_PIECE_H__
13
14#include "entity.h"
15#include "game.h"
16
17class PieceData;
18
19class Piece : public Entity
20{
21public:
22    Piece(Game *game, Int2 cell, int id);
23    virtual ~Piece();
24
25    void SetCell(Int2 cell);
26    Int2 GetCell() const;
27    void SetPos(Int2 pos);
28    Int2 GetPos() const;
29    int GetId() const;
30
31    int IsDead() const;
32
33    int Blink();
34    int Pop();
35    int Grab(Int2 dir);
36    int Ungrab();
37    int Goto(Int2 dir, float speed);
38
39protected:
40    virtual void TickGame(float deltams);
41    virtual void TickDraw(float deltams);
42
43private:
44    PieceData *data;
45};
46
47#endif // __DH_PIECE_H__
48
Note: See TracBrowser for help on using the repository browser.