Example #1
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.CompareTag("bola") || col.gameObject.CompareTag("bolaclone"))
     {
         TocaAudio.TocadordeAudio(audioS, clip);
     }
 }
Example #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);
     }
 }
Example #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);
     }
 }