summaryrefslogtreecommitdiffstats
path: root/matchblox/C_Block.h
blob: f0e03b7bce02f8abdd7a282f24bbecb5677c6250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef C_BLOCK_HEADER_FILE

#define C_BLOCK_HEADER_FILE

#include "C_3DObject.h"

typedef enum BlockAnimState
{
  BS_IDLE     = 0,
  BS_FADE_IN  = 1,
  BS_FADE_OUT = 2,
  BS_COLLIDE  = 3
};


class C_Block : public C_3DObject
{
public:
  C_Block(const char* f_strFileName,
          GLuint f_uiColorTex ,
          MatProps_t f_Mat);
  ~C_Block();

  void Render(unsigned int f_iElapsedTime);
  inline void SetState(BlockAnimState f_State, unsigned int f_uiElapsedTime) { m_CurrState = f_State; m_uiAnimStart = f_uiElapsedTime; }

private:
  BlockAnimState m_CurrState;
  unsigned int   m_uiAnimStart;
};

#endif //C_BLOCK_HEADER_FILE