diff options
author | nirav <nirav@airmail.cc> | 2020-12-12 07:18:36 +0000 |
---|---|---|
committer | nirav <nirav@airmail.cc> | 2020-12-12 07:18:36 +0000 |
commit | 115f77bda0246a00f6e17469685c67746bdbd29d (patch) | |
tree | 4bbea1e59109bb1d1fddc71736f89289bab03073 /Assets/Scripts/LevelEnd | |
download | 01-master.tar.gz 01-master.zip |
Diffstat (limited to 'Assets/Scripts/LevelEnd')
-rwxr-xr-x | Assets/Scripts/LevelEnd/EndLevel.cs | 26 | ||||
-rwxr-xr-x | Assets/Scripts/LevelEnd/EndLevel.cs.meta | 12 |
2 files changed, 38 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); + } + } +} diff --git a/Assets/Scripts/LevelEnd/EndLevel.cs.meta b/Assets/Scripts/LevelEnd/EndLevel.cs.meta new file mode 100755 index 0000000..2166f6f --- /dev/null +++ b/Assets/Scripts/LevelEnd/EndLevel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3f9aa6e6e86289a4cbc2eb10d4b9cba0 +timeCreated: 1472992376 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: |