コード例 #1
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		GotoCurrentHelperNode
//
// Description:	Transitions the behaviors state
//
// Parameters:	coverCombatStates_t state -- The state to transition to
//
// Returns:		None
//--------------------------------------------------------------
void GotoCurrentHelperNode::transitionToState( GotoHelperNodeStates_t state )
{	
	switch ( state )
		{	
		case GOTO_HNODE_FIND_NODE:
			setupStateFindNode();
			setInternalState( state , "GOTO_HNODE_FIND_NODE" );
		break;

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

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

		case GOTO_HNODE_FAILED:
			setInternalState( state , "GOTO_HNODE_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;
	}
}
コード例 #3
0
//--------------------------------------------------------------
// Name:		transitionToState()
// Class:		Work
//
// Description:	Transitions Internal State
//
// Parameters:	workStates_t state
//
// Returns:		None
//--------------------------------------------------------------
void Work::transitionToState ( workStates_t state )
{
	switch ( state )
		{
		case WORK_FIND_NODE:
			setupStateFindNode();
			setInternalState( state , "WORK_FIND_NODE" );
		break;

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

		case WORK_AT_NODE:
			setupStateAtNode();
			setInternalState( state , "WORK_AT_NODE" );
		break;

		case WORK_ANIMATE_WAIT_ON_TIME:
			setupStateAnimateWaitOnTime();
			setInternalState( state , "WORK_ANIMATE_WAIT_ON_TIME" );
		break;

		case WORK_ANIMATE_WAIT_ON_ANIM:
			setupStateAnimateWaitOnAnim();
			setInternalState( state , "WORK_ANIMATE_WAIT_ON_ANIM" );
		break;

		case WORK_ANIMATE_WAIT_ON_SIGNAL:
			setupStateAnimateWaitOnSignal();
			setInternalState( state , "WORK_ANIMATE_WAIT_ON_SIGNAL" );
		break;

		case WORK_ANIMATE_CONSTANT:
			setupStateAnimateConstant();
			setInternalState( state , "WORK_ANIMATE_CONSTANT" );
		break;

		case WORK_ANIMATE_LIST_WAIT_ON_TIME:
			setupStateAnimateListWaitOnTime();
			setInternalState( state , "WORK_ANIMATE_LIST_WAIT_ON_TIME" );
		break;

		case WORK_ANIMATE_LIST_WAIT_ON_ANIM:
			setupStateAnimateListWaitOnAnim();
			setInternalState( state , "WORK_ANIMATE_LIST_WAIT_ON_ANIM" );
		break;

		case WORK_ANIMATE_LIST_WAIT_ON_SIGNAL:
			setupStateAnimateListWaitOnSignal();
			setInternalState( state , "WORK_ANIMATE_LIST_WAIT_ON_SIGNAL" );
		break;

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

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

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

}