Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnTriggerEnter2D(Collider2D Col) {
- if (Col.gameObject.Tag == "Kill") {
- gameObject.transform.position = spawn;
- }
- if (Col.gameObject.Tag == "Checkpoint") {
- spawn = Col.gameObject.transform.position;
- Destroy(Col.gameObject);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement