IEnumerator attk2() { yield return(new WaitForSeconds(0.1f)); spaceship = GetComponent <pSpaceship2>(); spaceship.shot2(transform); StopCoroutine("attk2"); yield return(new WaitForSeconds(0.5f)); }
IEnumerator attk3() { yield return(new WaitForSeconds(0.1f)); spaceship = GetComponent <pSpaceship2>(); spaceship.Shot3(transform); AudioSource.PlayClipAtPoint(shoot, transform.position); StopCoroutine("attk3"); yield return(new WaitForSeconds(0.5f)); }