Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #pragma strict
  2.  
  3. public var expl : GameObject;
  4.  
  5. function OnTriggerEnter2D (other : Collider2D)
  6. {
  7. var newPos : Vector3 = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, 0);
  8. Instantiate(expl, newPos, Quaternion.identity);
  9. Destroy(gameObject);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement