void DetectShootInput() { if (Input.GetKeyDown(KeyCode.Mouse0)) { ShootInput?.Invoke(); } }
void DetectShootInput() { //left click is pressed if (Input.GetKeyDown(KeyCode.Mouse0)) { ShootInput?.Invoke(); } }
private void CheckShootInput() { if (Input.GetKeyDown(gameSettings.shootKey)) { ShootInput.Invoke(KeyInputType.Down); } else if (Input.GetKey(gameSettings.shootKey)) { ShootInput.Invoke(KeyInputType.Held); } else if (Input.GetKeyUp(gameSettings.shootKey)) { ShootInput.Invoke(KeyInputType.Up); } }
// Update is called once per frame public void OnShoot(InputValue value) { var shoot = new ShootInput { }; inputBuffer.AddInput(CharSelector.SelectedCharacter, shoot); var button = new ButtonInput { is_press = value.isPressed, is_release = !value.isPressed, button_name = "Shoot", value = value.Get <float>() }; inputBuffer.AddInput(CharSelector.SelectedCharacter, button); }