Esempio n. 1
0
 private IEnumerator AutoFire()
 {
     while (true)
     {
         //Instantiate(Bolt, BoltPosition.position, BoltPosition.rotation);
         Bolt temp = boltPool.GetFromPool();
         temp.transform.position = BoltPosition.position;
         temp.transform.rotation = BoltPosition.rotation;
         temp.gameObject.SetActive(true);
         soundControl.PlayerEffectSound((int)eSoundEffect.shotEnemy);
         yield return(new WaitForSeconds(1));
     }
 }
Esempio n. 2
0
    private IEnumerator BossFire(float timer)
    {
        WaitForSeconds gap = new WaitForSeconds(.6f);

        while (timer > 0)
        {
            Bolt temp = boltPool.GetFromPool();
            temp.transform.position = BoltPos.position;
            temp.transform.rotation = BoltPos.rotation;
            temp.gameObject.SetActive(true);
            soundControl.PlayerEffectSound((int)eSoundEffect.shotEnemy);
            yield return(gap);

            timer -= .6f;
        }
    }