IC	static bool predicate					(const moving_object *_0, const moving_object *_1)
	{
		if (standing(_0)) {
			if (standing(_1))
				return			(_0 < _1);

			return				(false);
		}

		if (standing(_1))
			return				(true);

		return					(_0 < _1);
	}
MotionID CStalkerAnimationManager::assign_legs_animation	()
{
	if (standing())
		return					(legs_no_move_animation());

	return						(legs_move_animation());
}
MotionID CStalkerAnimationManager::assign_legs_animation	()
{
	MotionID					result;
	if (standing()) {
		result					= legs_no_move_animation();
		if (!result.valid())
			legs_no_move_animation();
		return					(result);
	}

	result						= legs_move_animation();
	if (!result.valid())
		legs_move_animation();

	return						(result);
}
Exemple #4
0
void 
Curupira::update(SDL_Rect target)
{
	//loop("[Curupira] Updating.");
	updatePosition(target);

	switch (m_state)
	{
		case UNDERGROUND:
			underground();
		break;
		case STANDING:
			standing();
		break;
		case ATTACKING:
			attacking();
		break;
		case MOVING:
			moving();
		break;
	}

	if(!m_hunt || !m_rose)
	{
		m_state = UNDERGROUND;
	}
	else if (m_damaging)
	{
		m_state = ATTACKING;
	}
	else
	{

		m_state = MOVING;
		if(isOnLeftDirection())
		{
			//condition("[Curupira] Moving Backward.");
			m_looking = BACKWARD;
		}
		else if(isOnRightDirection())
		{
			//condition("[Curupira] Moving Forward.");
			m_looking = FORWARD;
		}	
	}
}