This commit is contained in:
parent
dec3ff76ef
commit
fd97883718
7 changed files with 145 additions and 12 deletions
|
@ -40,6 +40,14 @@ void CNpcFallingBlockPlatform::postInit()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFallingBlockPlatform::trigger()
|
||||
{
|
||||
m_isTriggered = true;
|
||||
m_timer = GameState::getOneSecondInFrames();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFallingBlockPlatform::processMovement( int _frames )
|
||||
{
|
||||
if ( m_isTriggered )
|
||||
|
@ -80,11 +88,6 @@ void CNpcFallingBlockPlatform::processMovement( int _frames )
|
|||
Pos.vy += moveY;
|
||||
}
|
||||
}
|
||||
else if ( m_contact )
|
||||
{
|
||||
m_isTriggered = true;
|
||||
m_timer = GameState::getOneSecondInFrames();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -24,6 +24,7 @@ public:
|
|||
void postInit();
|
||||
CRECT const *getThinkBBox() {return( CThing::getThinkBBox() );}
|
||||
int checkCollisionAgainst(CThing *_thisThing, int _frames);
|
||||
void trigger();
|
||||
protected:
|
||||
void processMovement( int _frames );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue