public void OnShoot(InputAction.CallbackContext ctx)
 {
     if (ctx.performed)
     {
         _shootingController.Shoot();
     }
 }
Пример #2
0
    private void CheckShoot()
    {
        if (Input.GetKey(KeyCode.J) && shootCooldown >= ShootCooldownStart)
        {
            
            playerShootingController.Shoot(lastDirection.normalized);
            shootCooldown = 0;
        }

        if (Input.GetKeyDown(KeyCode.B))
        {
            playerShootingController.CombineBullets();
        }
        shootCooldown += Time.deltaTime;
    }