public override void Shoot() { if (NbBullets > 0) { PlayerGun.ShootBullet(4f); PlayerGun.ShootBullet(); PlayerGun.ShootBullet(-4f); NbBullets--; } }
// 射撃のメソッド呼び出し void InputShoot() { if (Input.GetKeyDown(reloadB)) { S_Pgun.Reload(); // リロードする } else if (Input.GetMouseButtonDown(shootB)) // 射撃の入力があるかどうか { int _ammo = S_Pgun.ShootBullet(); // 射撃する AmmoUpdate(_ammo); // 弾薬のUI更新 } }
public override void Update() { if (_numberOfShots == 0) { return; } _currentTime += Time.deltaTime; if (_currentTime > 0.1f) { _currentTime = 0f; _numberOfShots--; PlayerGun.ShootBullet(); } }
public override void Shoot() { PlayerGun.ShootBullet(); }