Beispiel #1
0
 void DetectShootInput()
 {
     if (Input.GetKeyDown(KeyCode.Mouse0))
     {
         ShootInput?.Invoke();
     }
 }
Beispiel #2
0
 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);
     }
 }