override protected void InitializeControllerStates() { myControllerState_GraveGround = new ControllerState_Grave_Ground(this); myControllerState_GraveAir = new ControllerState_Grave_Air(this); myControllerState_GraveWater = new ControllerState_Grave_Water(this); myControllerState = myControllerState_GraveAir; }
public void SwitchState(ControllerState_Grave newControllerState) { ExitState(); //calls the exit function in current state myHumanController.myControllerState = newControllerState; //switches state newControllerState.EnterState(); //calls enter function in new state }