void DetectJumpInput() { if (Input.GetKeyDown(KeyCode.Space)) { JumpInput?.Invoke(); } }
void DetectJumpInput() { //check for Spacebar press if (Input.GetKeyDown(KeyCode.Space)) { JumpInput?.Invoke(); } }
void DetectJumpInput() { //spacebar is pressed if (Input.GetKeyDown(KeyCode.Space)) { JumpInput?.Invoke(); } }
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(); } }