Ares
|
#include <src/Misc/SWTypes.h>
Public Member Functions | |
bool | Finished () |
int | TimePassed () |
SWStateMachine (int Duration, CellStruct XY, SuperClass *pSuper, NewSWType *pSWType) | |
virtual | ~SWStateMachine () |
virtual void | Update () |
virtual void | PointerGotInvalid (void *ptr) |
SWTypeExt::ExtData * | FindExtData () |
Static Public Member Functions | |
static void | UpdateAll () |
static void | InvalidatePointer (void *ptr) |
Static Public Attributes | |
static DynamicVectorClass < SWStateMachine * > | Array |
Protected Attributes | |
TimerStruct | Clock |
SuperClass * | Super |
NewSWType * | Type |
CellStruct | Coords |
SWStateMachine::SWStateMachine | ( | int | Duration, |
CellStruct | XY, | ||
SuperClass * | pSuper, | ||
NewSWType * | pSWType | ||
) | [inline] |
virtual SWStateMachine::~SWStateMachine | ( | ) | [inline, virtual] |
SWTypeExt::ExtData* SWStateMachine::FindExtData | ( | ) | [inline] |
{ return SWTypeExt::ExtMap.Find(this->Super->Type); }
bool SWStateMachine::Finished | ( | ) | [inline] |
{ return Clock.IsDone(); }
void SWStateMachine::InvalidatePointer | ( | void * | ptr | ) | [static] |
{ for(int i = SWStateMachine::Array.Count - 1; i >= 0; --i) { SWStateMachine* Machine = SWStateMachine::Array[i]; Machine->PointerGotInvalid(ptr); } }
virtual void SWStateMachine::PointerGotInvalid | ( | void * | ptr | ) | [inline, virtual] |
Reimplemented in ChronoWarpStateMachine.
{};
int SWStateMachine::TimePassed | ( | ) | [inline] |
{ return Unsorted::CurrentFrame - Clock.StartTime; }
virtual void SWStateMachine::Update | ( | ) | [inline, virtual] |
Reimplemented in UnitDeliveryStateMachine, ChronoWarpStateMachine, and PsychicDominatorStateMachine.
{};
void SWStateMachine::UpdateAll | ( | ) | [static] |
{ for(int i = SWStateMachine::Array.Count - 1; i >= 0; --i) { SWStateMachine* Machine = SWStateMachine::Array[i]; Machine->Update(); if(Machine->Finished()) { SWStateMachine::Array.RemoveItem(i); delete Machine; } } }
DynamicVectorClass< SWStateMachine * > SWStateMachine::Array [static] |
TimerStruct SWStateMachine::Clock [protected] |
CellStruct SWStateMachine::Coords [protected] |
SuperClass* SWStateMachine::Super [protected] |
NewSWType* SWStateMachine::Type [protected] |