Beispiel #1
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.CompareTag("bola") || col.gameObject.CompareTag("bolaclone"))
     {
         TocaAudio.TocadordeAudio(audioS, clip);
     }
 }
Beispiel #2
0
 void OnTriggerExit2D(Collider2D col)
 {
     if (col.gameObject.CompareTag("bola") || col.gameObject.CompareTag("bolaclone"))
     {
         GAMEMANAGER.instance.pontos++;
         ShootScript.fez3ponto = true;
         TocaAudio.TocadordeAudio(audioS, clip);
     }
 }
Beispiel #3
0
    void OnTriggerExit2D(Collider2D col)
    {
        if (col.gameObject.CompareTag("bola") || col.gameObject.CompareTag("bolaclone"))
        {
            GAMEMANAGER.instance.pontos++;

            GAMEMANAGER.instance.moedasIntSave += GAMEMANAGER.instance.pontos * 50;

            UIMANAGER.instance.moedasUI.text = (GAMEMANAGER.instance.moedasIntSave).ToString("c");

            ShootScript.fezponto = true;
            TocaAudio.TocadordeAudio(audioS, clip);
            Instantiate(pontosImg, gameObject.transform.position, Quaternion.identity);
        }
    }