Пример #1
0
void CLick::process()
{
	(this->*mp_processState)();

	processActionRoutine();

	processFalling();
}
Пример #2
0
void CMimrock::process()
{
	performCollisions();
	processFalling();

	(this->*mp_processState)();

	processActionRoutine();
}
Пример #3
0
void CBerkFlame::process()
{

	processFalling();

	performCollisions();

	(this->*mpProcessState)();

	if(!processActionRoutine())
			exists = false;

}
Пример #4
0
void CThunderCloud::process()
{
	if( mpBolt )
	{
		if(!mpBolt->exists)
			mpBolt = NULL; // This can be done because the object container will care deleting the it.
	}

	performCollisions();
	processFalling();

	if( blockedl )
		xDirection = RIGHT;
	else if( blockedr )
		xDirection = LEFT;

	(this->*mpProcessState)();

	mTimer++;

	processActionRoutine();
}
Пример #5
0
void CCouncilMember::processWalking()
{
	performCollisions();
	processFalling();


	// Check if there is a cliff and move him back in case
	performCliffStop(m_Action.H_anim_move_amount<<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( m_hDir == RIGHT )
		moveRight( m_Action.H_anim_move_amount<<1 );
	else
		moveLeft( m_Action.H_anim_move_amount<<1 );

}