示例#1
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		GeneralCombatWithRangedWeapon
//
// Description:	Transitions the behaviors state
//
// Parameters:	coverCombatStates_t state -- The state to transition to
//
// Returns:		None
//--------------------------------------------------------------
void GeneralCombatWithRangedWeapon::transitionToState( generalCombatStates_t state )
{
	
	switch ( state )
	{
	case GC_WRW_CHANGE_POSTURE_TO_ADVANCE:
		setupStateChangePostureToAdvance();
		setInternalState( state , "GC_WRW_CHANGE_POSTURE_TO_ADVANCE" );
	break;

	case GC_WRW_CHANGE_POSTURE_TO_RETREAT:
		setupStateChangePostureToRetreat();
		setInternalState( state , "GC_WRW_CHANGE_POSTURE_TO_RETREAT" );
	break;

	case GC_WRW_ADVANCE:
		setupStateAdvance();
		setInternalState( state , "GC_WRW_ADVANCE" );
	break;

	case GC_WRW_ADVANCE_FIRING:
		setupStateAdvanceFiring();
		setInternalState( state , "GC_WRW_ADVANCE_FIRING" );
	break;

	case GC_WRW_RETREAT:
		setupStateRetreat();
		setInternalState( state , "GC_WRW_RETREAT" );
	break;

	case GC_WRW_RETREAT_FIRING:
		setupStateRetreatFiring();
		setInternalState( state , "GC_WRW_RETREAT_FIRING" );
	break;

	case GC_WRW_STRAFE:
		setupStateStrafe();
		setInternalState( state , "GC_WRW_STRAFE" );
	break;

	case GC_WRW_CHANGE_POSTURE_DUCK:
		setupStateChangePostureDuck();
		setInternalState( state , "GC_WRW_CHANGE_POSTURE_DUCK" );
	break;

	case GC_WRW_DUCKED:
		setupStateDucked();
		setInternalState( state , "GC_WRW_DUCKED" );
	break;

	case GC_WRW_DUCKED_FIRING:
		setupStateDuckedFiring();
		setInternalState( state , "GC_WRW_DUCKED_FIRING" );
	break;

	case GC_WRW_CHANGE_POSTURE_STAND:
		setupStateChangePostureStand();
		setInternalState( state , "GC_WRW_CHANGE_POSTURE_STAND" );
	break;

	case GC_WRW_STAND:
		setupStateStand();
		setInternalState( state , "GC_WRW_STAND" );
	break;

	case GC_WRW_STAND_FIRING:
		setupStateStandFiring();
		setInternalState( state , "GC_WRW_STAND_FIRING" );
	break;

	case GC_WRW_FAILED:
		setInternalState( state , "GC_WRW_FAILED" );
	break;
	}
	
}
示例#2
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		CorridorCombatWithRangedWeapon
//
// Description:	Transitions the behaviors state
//
// Parameters:	coverCombatStates_t state -- The state to transition to
//
// Returns:		None
//--------------------------------------------------------------
void CorridorCombatWithRangedWeapon::transitionToState( corridorCombatStates_t state )
{
	switch ( state )
	{
	case CORRIDORCOMBAT_WRW_FINDNODE:
		setupStateFindNode();	
		setInternalState( state , "CORRIDORCOMBAT_WRW_FINDNODE" );
	break;

	case CORRIDORCOMBAT_WRW_MOVETONODE:
		setupStateMoveToNode();	
		setInternalState( state , "CORRIDORCOMBAT_WRW_MOVETONODE" );
	break;

	case CORRIDORCOMBAT_WRW_BACKPEDAL:
		setupStateBackPedal();
		setInternalState( state , "CORRIDORCOMBAT_WRW_BACKPEDAL" );
	break;

	case CORRIDORCOMBAT_WRW_FINDBETTERNODE:
		setupStateFindBetterNode();
		setInternalState( state , "CORRIDORCOMBAT_WRW_FINDBETTERNODE" );
	break;

	case CORRIDORCOMBAT_WRW_MOVETOBETTERNODE:
		setupStateMoveToBetterNode();
		setInternalState( state , "CORRIDORCOMBAT_WRW_MOVETOBETTERNODE" );
	break;

	case CORRIDORCOMBAT_WRW_CHANGEPOSTURE_DUCK:
		setupStateChangePostureDuck();
		setInternalState( state , "CORRIDORCOMBAT_WRW_CHANGEPOSTURE_DUCK" );
	break;

	case CORRIDORCOMBAT_WRW_CHANGEPOSTURE_STAND:
		setupStateChangePostureStand();
		setInternalState( state , "CORRIDORCOMBAT_WRW_CHANGEPOSTURE_STAND" );
	break;

	case CORRIDORCOMBAT_WRW_DUCKED:
		setupStateDucked();
		setInternalState( state , "CORRIDORCOMBAT_WRW_DUCKED" );
	break;

	case CORRIDORCOMBAT_WRW_DUCKED_FIRING:
		setupStateFireDucked();
		setInternalState( state , "CORRIDORCOMBAT_WRW_DUCKED_FIRING" );
	break;

	case CORRIDORCOMBAT_WRW_STAND:
		setupStateStanding();
		setInternalState( state , "CORRIDORCOMBAT_WRW_STAND" );
	break;

	case CORRIDORCOMBAT_WRW_STAND_FIRING:
		setupStateFireStanding();
		setInternalState( state , "CORRIDORCOMBAT_WRW_STAND_FIRING" );
	break;

	case CORRIDORCOMBAT_WRW_HOLD_POSITION:
		setupStateHoldPosition();
		setInternalState( state , "CORRIDORCOMBAT_WRW_HOLD_POSITION" );
	break;

	case CORRIDORCOMBAT_WRW_SUCCESS:
		setInternalState( state , "CORRIDORCOMBAT_WRW_SUCCESS" );
	break;

	case CORRIDORCOMBAT_WRW_FAILED:
		setInternalState( state , "CORRIDORCOMBAT_WRW_FAILED" );
	break;
	}
}