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); } }