#include <CArenaCloser.h>
Public Member Functions | |
CArenaCloser (void) | |
Constructor. | |
~CArenaCloser (void) | |
Destructor. | |
void | SetArena (CArena *pArena) |
Set the arena to close. | |
void | SetOptions (COptions *pOptions) |
Set the options object to use. | |
void | Create (void) |
Initialize the arena closer (this doesn't start closure). | |
void | Destroy (void) |
Uninitialize the arena closer (frees any allocated memory). | |
void | Start (void) |
Start to close the arena. | |
void | Stop (void) |
Stop closing the arena. | |
void | Update (float DeltaTime) |
Close the arena if closure has started. | |
void | WriteSnapshot (CArenaSnapshot &Snapshot) |
void | ReadSnapshot (CArenaSnapshot &Snapshot) |
bool | IsClosing (void) |
Is the arena currently closing? | |
int | GetNextBlockPositionX (int Index) |
Get the X position (in blocks) of the block that will be closed next. | |
int | GetNextBlockPositionY (int Index) |
Get the Y position (in blocks) of the block that will be closed next. | |
int | GetNumberOfBlocksLeft (void) |
Get the number of blocks the arena closer still has to close. | |
float | GetTimeBetweenTwoBlockClosures (void) |
Get the time (in seconds) that elapses between the closure of one block and the closure of the next block. | |
float | GetTimeLeftBeforeClosingNextBlock (void) |
Get the time left (in seconds) before the next block should start closing. | |
Private Member Functions | |
void | CreateSpiralClosing (void) |
Prepare the closure data for a spiral arena closure. | |
void | CreateHorizontalClosing (void) |
Prepare the closure data for an horizontal arena closure. | |
void | CreateVerticalClosing (void) |
Prepare the closure data for a vertical arena closure. | |
Private Attributes | |
CArena * | m_pArena |
Arena to close. | |
COptions * | m_pOptions |
Options object where to find the arena closure settings for this match. | |
TClosure | m_ClosureData |
Sequence of block positions which have to be closed in this order. | |
float | m_TimeBetweenTwoBlockClosures |
How many seconds should elapse after closing a block and before closing the next block? | |
float | m_TimeLeftBeforeClosingNextBlock |
Time left in seconds before the next block should start closing. | |
bool | m_IsClosing |
Is the arena currently closing? |
CArenaCloser::CArenaCloser | ( | void | ) |
Constructor.
CArenaCloser::~CArenaCloser | ( | void | ) |
Destructor.
void CArenaCloser::CreateSpiralClosing | ( | void | ) | [private] |
Prepare the closure data for a spiral arena closure.
void CArenaCloser::CreateHorizontalClosing | ( | void | ) | [private] |
Prepare the closure data for an horizontal arena closure.
void CArenaCloser::CreateVerticalClosing | ( | void | ) | [private] |
Prepare the closure data for a vertical arena closure.
void CArenaCloser::SetArena | ( | CArena * | pArena | ) | [inline] |
Set the arena to close.
void CArenaCloser::SetOptions | ( | COptions * | pOptions | ) | [inline] |
Set the options object to use.
void CArenaCloser::Create | ( | void | ) |
Initialize the arena closer (this doesn't start closure).
void CArenaCloser::Destroy | ( | void | ) |
Uninitialize the arena closer (frees any allocated memory).
void CArenaCloser::Start | ( | void | ) |
Start to close the arena.
void CArenaCloser::Stop | ( | void | ) |
Stop closing the arena.
void CArenaCloser::Update | ( | float | DeltaTime | ) |
Close the arena if closure has started.
void CArenaCloser::WriteSnapshot | ( | CArenaSnapshot & | Snapshot | ) |
void CArenaCloser::ReadSnapshot | ( | CArenaSnapshot & | Snapshot | ) |
bool CArenaCloser::IsClosing | ( | void | ) | [inline] |
Is the arena currently closing?
int CArenaCloser::GetNextBlockPositionX | ( | int | Index | ) | [inline] |
Get the X position (in blocks) of the block that will be closed next.
int CArenaCloser::GetNextBlockPositionY | ( | int | Index | ) | [inline] |
Get the Y position (in blocks) of the block that will be closed next.
int CArenaCloser::GetNumberOfBlocksLeft | ( | void | ) | [inline] |
Get the number of blocks the arena closer still has to close.
float CArenaCloser::GetTimeBetweenTwoBlockClosures | ( | void | ) | [inline] |
Get the time (in seconds) that elapses between the closure of one block and the closure of the next block.
float CArenaCloser::GetTimeLeftBeforeClosingNextBlock | ( | void | ) | [inline] |
Get the time left (in seconds) before the next block should start closing.
CArena* CArenaCloser::m_pArena [private] |
Arena to close.
COptions* CArenaCloser::m_pOptions [private] |
Options object where to find the arena closure settings for this match.
TClosure CArenaCloser::m_ClosureData [private] |
Sequence of block positions which have to be closed in this order.
float CArenaCloser::m_TimeBetweenTwoBlockClosures [private] |
How many seconds should elapse after closing a block and before closing the next block?
float CArenaCloser::m_TimeLeftBeforeClosingNextBlock [private] |
Time left in seconds before the next block should start closing.
bool CArenaCloser::m_IsClosing [private] |
Is the arena currently closing?