void DetectJumpInput()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         JumpInput?.Invoke();
     }
 }
Example #2
0
 void DetectJumpInput()
 {
     //check for Spacebar press
     if (Input.GetKeyDown(KeyCode.Space))
     {
         JumpInput?.Invoke();
     }
 }
Example #3
0
 void DetectJumpInput()
 {
     //spacebar is pressed
     if (Input.GetKeyDown(KeyCode.Space))
     {
         JumpInput?.Invoke();
     }
 }
Example #4
0
 void DetectJumpInput()
 {
     if (Input.GetAxisRaw("Jump") > 0)
     {
         if (!_jmp)
         {
             _jmp = true;
             JumpInput?.Invoke();
         }
     }
     if (Input.GetAxisRaw("Jump") == 0)
     {
         _jmp = false;
     }
 }
 void DetectJumpInput()
 {
     if (Input.GetMouseButtonDown(1))
     {
         if (_audioSource.isPlaying == false)
         {
             _audioSource.Play();
         }
     }
     else if (Input.GetMouseButtonUp(1))
     {
         if (_audioSource.isPlaying)
         {
             _audioSource.Stop();
         }
     }
     //Right mouse button press
     if (Input.GetMouseButton(1))
     {
         JumpInput?.Invoke();
     }
 }