Advertisement
Guest User

explosao

a guest
Feb 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Explosao : MonoBehaviour {
  5.  
  6. public float time,tempTime;
  7. // Use this for initialization
  8. void Start () {
  9.  
  10. }
  11.  
  12. // Update is called once per frame
  13. void Update () {
  14.  
  15. tempTime += Time.deltaTime;
  16.  
  17. if(tempTime >= time){
  18. Destroy (this.gameObject);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement