diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eventblock.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/eventblock.cpp b/src/eventblock.cpp index f285da8..6f353b7 100644 --- a/src/eventblock.cpp +++ b/src/eventblock.cpp @@ -10,8 +10,6 @@ public: SWAP_EVENTS = 1 }; - typedef State<daEnEventBlock_c> State; - TileRenderer tile; Physics::Info physicsInfo; @@ -28,21 +26,16 @@ public: void calledWhenUpMoveExecutes(); void calledWhenDownMoveExecutes(); - void wait_Begin(); - void wait_Execute(); - void wait_End(); - void blockWasHit(bool isDown); - static State StateID_Wait; + USING_STATES(daEnEventBlock_c); + DECLARE_STATE(Wait); + static daEnEventBlock_c *build(); }; -daEnEventBlock_c::State daEnEventBlock_c::StateID_Wait( - "daEnEventBlock_c::StateID_Wait", - &daEnEventBlock_c::wait_Begin, - &daEnEventBlock_c::wait_Execute, - &daEnEventBlock_c::wait_End); + +CREATE_STATE(daEnEventBlock_c, Wait); int daEnEventBlock_c::onCreate() { @@ -184,13 +177,13 @@ void daEnEventBlock_c::calledWhenDownMoveExecutes() { -void daEnEventBlock_c::wait_Begin() { +void daEnEventBlock_c::beginState_Wait() { } -void daEnEventBlock_c::wait_End() { +void daEnEventBlock_c::endState_Wait() { } -void daEnEventBlock_c::wait_Execute() { +void daEnEventBlock_c::executeState_Wait() { int result = blockResult(); if (result == 0) |