Advertisement
gizoncio

Breakout aula 14 - pontuacaoBloco.cs

Jun 5th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. //////////////////////////////////////////////
  2. // Créditos Équilibré Cursos e Treinamentos //
  3. // http://www.equilibrecursos.net           //
  4. // http://www.youtube.com/equilibrecursos   //
  5. //////////////////////////////////////////////
  6.  
  7. using UnityEngine;
  8. using System.Collections;
  9.  
  10. public class pontuacaoBlocos : MonoBehaviour {
  11.  
  12.     private gameManager gManagerScript;
  13.  
  14.     // Use this for initialization
  15.     void Start () {
  16.         gManagerScript = GameObject.Find("GameManager").GetComponent<gameManager>();
  17.     }
  18.  
  19.     void OnDestroy()
  20.     {
  21.         if (gameObject.tag == "bloco_verde")
  22.             gManagerScript.pontuacao = gManagerScript.pontuacao + 10;
  23.  
  24.         if (gameObject.tag == "bloco_laranja")
  25.             gManagerScript.pontuacao = gManagerScript.pontuacao + 20;
  26.  
  27.         if (gameObject.tag == "bloco_azul")
  28.             gManagerScript.pontuacao = gManagerScript.pontuacao + 30;
  29.  
  30.         if (gameObject.tag == "bloco_amarelo")
  31.             gManagerScript.pontuacao = gManagerScript.pontuacao + 40;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement