public void HandleInput()
 {
     if (Input.GetKeyDown(KeyCode.UpArrow))
     {
         Debug.Log("get KeyCode.UpArrow!");
         _heroine.SetHeroineState(new JumpingState(_heroine));
     }
     if (Input.GetKeyDown(KeyCode.DownArrow))
     {
         Debug.Log("get KeyCode.DownArrow!");
         _heroine.SetHeroineState(new DuckingState(_heroine));
     }
 }
 public void HandleInput()
 {
     if (Input.GetKeyUp(KeyCode.DownArrow))
     {
         Debug.Log("get GetKeyUp.DownArrow!");
         _heroine.SetHeroineState(new StandingState(_heroine));
     }
 }
 public void HandleInput()
 {
     if (Input.GetKeyDown(KeyCode.UpArrow))
     {
         Debug.Log("get GetKeyDown.UpArrow! but already in Jumping! return!");
         return;
     }
     if (Input.GetKeyDown(KeyCode.DownArrow))
     {
         Debug.Log("get KeyCode.DownArrow!");
         _heroine.SetHeroineState(new DrivingState(_heroine));
     }
 }
Beispiel #4
0
 public void HandleInput()
 {
     if (Input.GetKeyDown(KeyCode.DownArrow))
     {
         Debug.Log("已经在下蹲躲避状态中!");
         return;
     }
     if (Input.GetKeyUp(KeyCode.UpArrow))
     {
         Debug.Log("get GetKeyUp.UpArrow!");
         _heroine.SetHeroineState(new StandingState(_heroine));
     }
 }