Advertisement
Wolvenspud

EW - mineScript

Nov 5th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class mineScript : MonoBehaviour {
  5.  
  6.     public GameObject self;
  7.     public GameObject theUnitM;
  8.     public emuScript emu;
  9.  
  10.     public void OnTriggerStay(Collider other)
  11.     {
  12.         if (other.tag == "emu")
  13.         {
  14.             //blow the fuck up wooooooooooo (anim stuff)
  15.             emu = other.GetComponent<emuScript>();
  16.             theUnitM.GetComponent<unitManager>().UpdateGrid(self.transform.position);
  17.             emu.Move();
  18.             Destroy(self);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement