Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class kill : MonoBehaviour {
- void OnTriggerEnter2D (Collider2D collision) {
- Transform respawn = GameObject.Find ("respawn").GetComponent<Transform>();
- collision.gameObject.SetActive(false);
- transform.position = respawn.position;
- collision.gameObject.SetActive(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment