Inheritance: MonoBehaviour
Beispiel #1
0
 void OnTriggerEnter(Collider col)
 {
     if (CollidePlayer(col))
     {
         CoconutThrower.CanThrow();
         CoconutWin.CheckAndHints();
     }
 }
Beispiel #2
0
    IEnumerator targetHit()
    {
        iAudio.PlayOneShot(hitSound);
        targetRoot.Play("down");
        beenHit = true;
        CoconutWin.IncrTargets();

        yield return(new WaitForSeconds(resetTime));

        iAudio.PlayOneShot(resetSound);
        targetRoot.Play("up");
        beenHit = false;
        CoconutWin.DecrTargets();
    }