source: trunk/monsterz/piece.h @ 263

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

Spawn new pieces at the correct coordinates for a free fall.

File size: 748 bytes
RevLine 
[226]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:
[243]22    Piece(Game *game, Int2 cell, int id);
[226]23    virtual ~Piece();
24
[248]25    void SetCell(Int2 cell);
[263]26    Int2 GetCell() const;
27    void SetPos(Int2 pos);
[245]28    Int2 GetPos() const;
[258]29    int GetId() const;
[245]30
[238]31    int Blink();
[258]32    int Pop();
[238]33    int Grab(Int2 dir);
34    int Ungrab();
[261]35    int Goto(Int2 dir, float speed);
[230]36
[226]37protected:
38    virtual void TickGame(float deltams);
39    virtual void TickDraw(float deltams);
40
41private:
42    PieceData *data;
43};
44
45#endif // __DH_PIECE_H__
46
Note: See TracBrowser for help on using the repository browser.