Exemplo n.º 1
0
 void DetectShootInput()
 {
     if (Input.GetKeyDown(KeyCode.Mouse0))
     {
         ShootInput?.Invoke();
     }
 }
Exemplo n.º 2
0
 void DetectShootInput()
 {
     //left click is pressed
     if (Input.GetKeyDown(KeyCode.Mouse0))
     {
         ShootInput?.Invoke();
     }
 }
Exemplo n.º 3
0
 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);
     }
 }