示例#1
0
 void AttackingLightGun()
 {
     if (Timer == 0)
     {
         Timer = 0.3f;
         ShootLightGun(GunPoint1);
         ShootLightGun(GunPoint2);
         Fire1.Emit();
         Fire2.Emit();
         gameManager.LightGunShootSound.Play();
     }
 }
示例#2
0
        IEnumerator ShootRocketLauncher()
        {
            Rocket _temproc;

            for (int i = 0; i < gameManager.RocketsPool.Count; i++)
            {
                if (!gameManager.RocketsPool [i].gameObject.activeSelf)
                {
                    _temproc        = gameManager.RocketsPool [i];
                    _temproc.Damage = Damage [Level];
                    _temproc.Target = CurrentTarget;
                    _temproc.gameObject.SetActive(true);
                    _temproc.transform.position = GunPoint1.position;
                    _temproc.transform.rotation = GunPoint1.rotation;
                    gameManager.RocketLaunchSound.Play();
                    Fire1.Emit();
                    break;
                }
            }

            yield return(new WaitForSeconds(0.3f));

            for (int i = 0; i < gameManager.RocketsPool.Count; i++)
            {
                if (!gameManager.RocketsPool [i].gameObject.activeSelf)
                {
                    _temproc        = gameManager.RocketsPool [i];
                    _temproc.Damage = Damage [Level];
                    _temproc.Target = CurrentTarget;
                    _temproc.gameObject.SetActive(true);
                    _temproc.transform.position = GunPoint2.position;
                    _temproc.transform.rotation = GunPoint2.rotation;
                    gameManager.RocketLaunchSound.Play();
                    Fire2.Emit();
                    break;
                }
            }
        }