void CArachnut::process() { performCollisions(); performGravityLow(); if( blockedl ) xDirection = RIGHT; else if( blockedr ) xDirection = LEFT; if( getActionStatus(A_ARACHNUT_WALK) ) setAction(A_ARACHNUT_WALK); if( getActionNumber(A_ARACHNUT_WALK) ) { // Move normally in the direction if( xDirection == RIGHT ) moveRight( WALK_SPEED ); else moveLeft( WALK_SPEED ); } if(!processActionRoutine()) exists = false; }
void CCouncilMember::processWalking() { performCollisions(); performGravityLow(); // Check if there is a cliff and move him back in case performCliffStop(m_Action.velX<<1); if( m_timer < ELDER_MOVE_TIMER ) { m_timer++; return; } else { m_timer = 0; } // Chance if he will think if( getProbability(25) ) { m_timer = 0; mp_processState = &CCouncilMember::processThinking; setAction(A_COUNCIL_MEMBER_THINK); return; } // Move normally in the direction if( xDirection == RIGHT ) moveRight( m_Action.velX<<1 ); else moveLeft( m_Action.velX<<1 ); }
void CPoisonSlug::process() { performCollisions(); performGravityLow(); if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CInchWorm::process() { performCollisions(); performGravityLow(); if(!processActionRoutine()) exists = false; if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!getActionStatus(0)) return; // Move normally in the direction if( xDirection == RIGHT ) moveRight( (m_Action.h_anim_move>>3)*((rand()%2)+1) ); else
void CWormmouth::process() { if( getActionNumber(A_WORMMOUTH_MOVE) || getActionNumber(A_WORMMOUTH_STUNNED) ) { performCollisions(); performGravityLow(); } (this->*mp_processState)(); if( getActionNumber(A_WORMMOUTH_STUNNED) ) return; if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!processActionRoutine()) exists = false; }