source: trunk/monsterz/piece.h @ 297

Last change on this file since 297 was 297, checked in by sam, 10 years ago

Use monster eyes as particles for the exploding effect.

File size: 879 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 "core.h"
15
16class PieceData;
17
18class Piece : public Entity
19{
20public:
21    Piece(Emitter *emitter, int2 cell, int id);
22    virtual ~Piece();
23
24    void SetCell(int2 cell);
25    int2 GetCell() const;
26    void SetPos(int2 pos);
27    int2 GetPos() const;
28    int GetId() const;
29
30    void SetAbove(Piece *below);
31    Piece *GetAbove() const;
32    void SetBelow(Piece *below);
33    Piece *GetBelow() const;
34
35    int IsDead() const;
36
37    int Blink();
38    int Pop();
39    int Grab(int2 dir);
40    int Ungrab(int2 pos);
41    int Move(int2 pos);
42
43protected:
44    virtual void TickGame(float deltams);
45    virtual void TickDraw(float deltams);
46
47private:
48    PieceData *data;
49};
50
51#endif // __DH_PIECE_H__
52
Note: See TracBrowser for help on using the repository browser.