00001 // --------------------------------------------------------------------------- 00002 // PLATFORM: All - 00003 // PRODUCT: Fourplay - 00004 // VISIBILITY: Public - 00005 // --------------------------------------------------------------------------- 00006 // - 00007 // PURPOSE: Square which will make up grid columns. - 00008 // - 00009 // --------------------------------------------------------------------------- 00010 00011 #ifndef GRIDSQUARE_H 00012 #define GRIDSQUARE_H 00013 00014 #include "GameConstants.h" 00015 #include "Iw2D.h" 00016 00021 class GridSquare 00022 { 00023 public: 00029 GridSquare(CIwFVec2 position, 00030 int tileSize); 00031 00035 ~GridSquare(); 00036 00040 void Draw(); 00041 00043 enum State {RED, YELLOW, EMPTY}; 00044 00048 void SetState(State newState); 00049 00054 State GetState(); 00055 00056 protected: 00058 CIwFVec2 m_position; 00059 00061 CIwFVec2 m_offsetPosition; 00062 00064 CIwFVec2 m_size; 00065 00067 static CIw2DImage *m_emptyTexture; 00068 00070 static CIw2DImage *m_redTexture; 00071 00073 static CIw2DImage *m_yellowTexture; 00074 00076 State m_state; 00077 }; 00078 00079 #endif