コード例 #1
0
 private void SpawnBullet()
 {
     if (bulletRespownTimer >= 1f)
     {
         model.RemoveBullet(1);
     }
     else
     {
         bulletRespownTimer += Time.deltaTime;
     }
 }
コード例 #2
0
 private void SpawnBullet()
 {
     if (bulletRespownTimer >= .1f)
     {
         bulletRespownTimer = 0;
         var bullet = Instantiate(Bullet, bulletsHolder);
         bullet.transform.position    = weaponHead.transform.position + new Vector3(0, .75f, 0);
         bullet.transform.eulerAngles = weaponHead.transform.eulerAngles;
         model.RemoveBullet(1);
     }
     else
     {
         bulletRespownTimer += Time.deltaTime;
     }
 }
コード例 #3
0
 private void SpawnBullet()
 {
     if (bulletRespownTimer >= .25f)
     {
         bulletRespownTimer = 0;
         foreach (var item in BulletSpownReference)
         {
             var bullet = Instantiate(Bullet, bulletsHolder);
             bullet.transform.position    = item.position + new Vector3(0, 0, 0);
             bullet.transform.eulerAngles = item.eulerAngles;
             model.RemoveBullet(1);
         }
     }
     else
     {
         bulletRespownTimer += Time.deltaTime;
     }
 }