Example #1
0
 void DetectSprintOffInput()
 {
     if (Input.GetKeyUp(KeyCode.LeftShift))
     {
         SprintOffInput?.Invoke();
     }
 }
Example #2
0
 void DetectSprintInput()
 {
     /*bool sprintInput = Input.GetKey(KeyCode.LeftShift);
      * if(sprintInput != false)
      * {
      *  //Debug.Log("Sprint on");
      *  SprintInput?.Invoke();
      * }*/
     if (Input.GetKeyDown(KeyCode.LeftShift))
     {
         SprintInput?.Invoke();
     }
     if (Input.GetKeyUp(KeyCode.LeftShift))
     {
         SprintOffInput?.Invoke();
     }
 }