1
0

Re-Organized level Hierarchy

This commit is contained in:
new-00-0ne 2016-01-31 04:48:18 -05:00
parent a40ade167d
commit fafd5a7381
9 changed files with 20 additions and 2 deletions

View File

@ -6,11 +6,12 @@ namespace UnityStandardAssets._2D
{ {
public class Restarter : MonoBehaviour public class Restarter : MonoBehaviour
{ {
public string levelName;
private void OnTriggerEnter2D(Collider2D other) private void OnTriggerEnter2D(Collider2D other)
{ {
if (other.tag == "Player") if (other.tag == "Scene_Object")
{ {
SceneManager.LoadScene(SceneManager.GetSceneAt(0).path); SceneManager.LoadScene(levelName);
} }
} }
} }

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 01275eb458a35534997899ab69e88ec4
folderAsset: yes
timeCreated: 1454231669
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3618f6054127b764196df66b030efa0d
timeCreated: 1454231680
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.