summaryrefslogtreecommitdiffstats
path: root/matchblox/engine/C_Block.h
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/engine/C_Block.h')
-rw-r--r--matchblox/engine/C_Block.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/matchblox/engine/C_Block.h b/matchblox/engine/C_Block.h
new file mode 100644
index 0000000..f0e03b7
--- /dev/null
+++ b/matchblox/engine/C_Block.h
@@ -0,0 +1,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
+