Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. public class Death : MonoBehaviour
  6. {
  7. public int index;
  8. public string levelName;
  9. void OnTriggerEnter2D(Collider2D other)
  10. {
  11. if (other.CompareTag("Player"))
  12. {
  13. SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
  14. Debug.Log("blah");
  15. }
  16.  
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement