#include <GridSquare.h>
Public Types | |
| enum | State { RED, YELLOW, EMPTY } |
State of the square. | |
Public Member Functions | |
| GridSquare (CIwFVec2 position, int tileSize) | |
| ~GridSquare () | |
| void | Draw () |
| void | SetState (State newState) |
| State | GetState () |
Protected Attributes | |
| CIwFVec2 | m_position |
| Position of the square. | |
| CIwFVec2 | m_offsetPosition |
| Offset position of the square for rendering. | |
| CIwFVec2 | m_size |
| Size of a tile. | |
| State | m_state |
| State of the square. | |
Static Protected Attributes | |
| static CIw2DImage * | m_emptyTexture |
| Texture for empty square. | |
| static CIw2DImage * | m_redTexture |
| Texture for red squares. | |
| static CIw2DImage * | m_yellowTexture |
| Texture for yellow squares. | |
Grid square.
A square in the grid column.
| GridSquare::GridSquare | ( | CIwFVec2 | position, | |
| int | tileSize | |||
| ) |
Constructor.
Create a new grid square.
| [in] | position | Position of the square (top left corner). |
| [in] | tileSize | Size of a grid tile. |
| GridSquare::~GridSquare | ( | ) |
Destructor.
Delete the square and release all associated memory.
| void GridSquare::Draw | ( | ) |
Draw.
Render the grid square.
| GridSquare::State GridSquare::GetState | ( | ) |
Get state.
Get the state of this square.
| void GridSquare::SetState | ( | State | newState | ) |
Set the state.
Set the colour of the square (red, yellow, empty).
1.7.1