summaryrefslogtreecommitdiff
path: root/Assets/Scripts/LevelEnd/EndLevel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/LevelEnd/EndLevel.cs')
-rwxr-xr-xAssets/Scripts/LevelEnd/EndLevel.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Assets/Scripts/LevelEnd/EndLevel.cs b/Assets/Scripts/LevelEnd/EndLevel.cs
new file mode 100755
index 0000000..76edea7
--- /dev/null
+++ b/Assets/Scripts/LevelEnd/EndLevel.cs
@@ -0,0 +1,26 @@
+using UnityEngine;
+using System.Collections;
+using UnityEngine.SceneManagement;
+
+public class EndLevel : MonoBehaviour {
+
+ public int Level;
+
+ // Use this for initialization
+ void Start () {
+
+ }
+
+ // Update is called once per frame
+ void Update () {
+
+ }
+
+ void OnTriggerEnter2D(Collider2D col)
+ {
+ if(col.tag == "PlayerCollider")
+ {
+ SceneManager.LoadScene(Level);
+ }
+ }
+}