Example #1
0
    IEnumerator attk2()
    {
        yield return(new WaitForSeconds(0.1f));

        spaceship = GetComponent <pSpaceship2>();
        spaceship.shot2(transform);

        StopCoroutine("attk2");
        yield return(new WaitForSeconds(0.5f));
    }
Example #2
0
    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));
    }