Advertisement
gizoncio

Breakout aula 14 - criaExplosao.cs

Jun 5th, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 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 criaExplosao : MonoBehaviour {
  11.  
  12.     // Use this for initialization
  13.     void Start () {
  14.         Destroy(gameObject, 1f);
  15.     }
  16.  
  17.     void OnTriggerEnter2D(Collider2D outro)
  18.     {
  19.         if (outro.gameObject.tag == "bloco_verde" || outro.gameObject.tag == "bloco_laranja" || outro.gameObject.tag == "bloco_azul" || outro.gameObject.tag == "bloco_amarelo")
  20.             Destroy(outro.gameObject);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement