diff options
Diffstat (limited to 'Assets/Scripts/EndLevel.cs')
-rw-r--r-- | Assets/Scripts/EndLevel.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Assets/Scripts/EndLevel.cs b/Assets/Scripts/EndLevel.cs new file mode 100644 index 0000000..6b7940c --- /dev/null +++ b/Assets/Scripts/EndLevel.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.SceneManagement; + +public class EndLevel : MonoBehaviour +{ + private void OnTriggerEnter2D(Collider2D collision) + { + if(collision.gameObject.tag == "Player") + { + SceneManager.LoadScene("Final Scene"); + } + } +} |