public void OnPreLoad() { sTask = new CRAPJailBreakTask(); sTask.AddToSimulator(); GameStates.sSingleton.mInWorldState = new InWorldStateEx(); List<StateMachineState> states = GameStates.sSingleton.mStateMachine.mStateList; for (int i = states.Count - 1; i >= 0; i--) { Type type = states[i].GetType(); if (type == typeof(InWorldState)) { states[i] = GameStates.sSingleton.mInWorldState; states[i].SetStateMachine(GameStates.sSingleton.mStateMachine); } } }
public void OnPreLoad() { sTask = new CRAPJailBreakTask(); sTask.AddToSimulator(); GameStates.sSingleton.mInWorldState = new InWorldStateEx(); List <StateMachineState> states = GameStates.sSingleton.mStateMachine.mStateList; for (int i = states.Count - 1; i >= 0; i--) { Type type = states[i].GetType(); if (type == typeof(InWorldState)) { states[i] = GameStates.sSingleton.mInWorldState; states[i].SetStateMachine(GameStates.sSingleton.mStateMachine); } } }