Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////////////////////
- // Créditos Équilibré Cursos e Treinamentos //
- // http://www.equilibrecursos.net //
- // http://www.youtube.com/equilibrecursos //
- //////////////////////////////////////////////
- using UnityEngine;
- using System.Collections;
- public class pontuacaoBlocos : MonoBehaviour {
- private gameManager gManagerScript;
- // Use this for initialization
- void Start () {
- gManagerScript = GameObject.Find("GameManager").GetComponent<gameManager>();
- }
- void OnDestroy()
- {
- if (gameObject.tag == "bloco_verde")
- gManagerScript.pontuacao = gManagerScript.pontuacao + 10;
- if (gameObject.tag == "bloco_laranja")
- gManagerScript.pontuacao = gManagerScript.pontuacao + 20;
- if (gameObject.tag == "bloco_azul")
- gManagerScript.pontuacao = gManagerScript.pontuacao + 30;
- if (gameObject.tag == "bloco_amarelo")
- gManagerScript.pontuacao = gManagerScript.pontuacao + 40;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement