Beispiel #1
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		StationaryFireCombat
//
// Description:	Transitions the behaviors state
//
// Parameters:	coverCombatStates_t state -- The state to transition to
//
// Returns:		None
//--------------------------------------------------------------
void StationaryFireCombat::transitionToState( StationaryFireStates_t state )
{	
	switch ( state )
		{	
		case STATIONARY_FIRE_AIM:
			setupStateAim();
			setInternalState( state , "STATIONARY_FIRE_AIM" );
		break;

		case STATIONARY_FIRE_PRE_FIRE:
			setupStatePreFire();
			setInternalState( state , "STATIONARY_FIRE_PRE_FIRE" );
		break;

		case STATIONARY_FIRE_ATTACK:
			setupStateAttack();
			setInternalState( state , "STATIONARY_FIRE_ATTACK" );
		break;

		case STATIONARY_FIRE_POST_FIRE:
			setupStatePostFire();
			setInternalState( state , "STATIONARY_FIRE_POST_FIRE" );
		break;

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

		case STATIONARY_FIRE_FAILED:
			setInternalState( state , "SUPPRESSION_FIRE_FAILED" );
		break;
		}
	
}
Beispiel #2
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		TorsoAimAndFireWeapon
//
// Description:	Transitions the behaviors state
//
// Parameters:	coverCombatStates_t state -- The state to transition to
//
// Returns:		None
//--------------------------------------------------------------
void TorsoAimAndFireWeapon::transitionToState( TorsoAimAndFireStates_t state )
{	
	switch ( state )
		{	
		case TORSO_AIM_AND_FIRE_AIM:
			setupStateAim();
			setInternalState( state , "TORSO_AIM_AND_FIRE_AIM" );
		break;

		case TORSO_AIM_AND_FIRE_PRE_FIRE:
			setupStatePreFire();
			setInternalState( state , "TORSO_AIM_AND_FIRE_PRE_FIRE" );
		break;

		case TORSO_AIM_AND_FIRE_ATTACK:
			setupStateAttack();
			setInternalState( state , "TORSO_AIM_AND_FIRE_ATTACK" );
		break;

		case TORSO_AIM_AND_FIRE_POST_FIRE:
			setupStatePostFire();
			setInternalState( state , "TORSO_AIM_AND_FIRE_POST_FIRE" );
		break;

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

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