Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 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
 }