Guest User

Untitled

a guest
May 17th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. public class kill : MonoBehaviour {
  2.  
  3.     void OnTriggerEnter2D (Collider2D collision) {
  4.         Transform respawn = GameObject.Find ("respawn").GetComponent<Transform>();
  5.         collision.gameObject.SetActive(false);
  6.  
  7.         transform.position = respawn.position;
  8.         collision.gameObject.SetActive(true);
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment