Exemple #1
0
 void Awake()
 {
     audioSource = GetComponent <AudioSource>();
     Mouth001_Obj.SetActive(true);
     Mouth002_Obj.SetActive(false);
     canShoot = true;
 }
Exemple #2
0
    IEnumerator IsShooting()
    {
        canShoot = false;
        Mouth001_Obj.SetActive(false);
        Mouth002_Obj.SetActive(true);
        audioSource.clip = Spit;
        audioSource.Play();
        Instantiate(Ball_Pfb, SpawnLocation.transform.position, SpawnLocation.transform.rotation);
        yield return(new WaitForSeconds(1));

        Mouth001_Obj.SetActive(true);
        Mouth002_Obj.SetActive(false);
        yield return(new WaitForSeconds(1));

        canShoot = true;
    }