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