diff Assets/Application/Scripts/StageManager.cs @ 3:2dd40b4412e4

Create game base.
author Kazuma
date Mon, 07 Nov 2016 18:42:01 +0900
parents e5ef0342d00b
children 2878be4487ec
line wrap: on
line diff
--- a/Assets/Application/Scripts/StageManager.cs	Mon Nov 07 02:05:00 2016 +0900
+++ b/Assets/Application/Scripts/StageManager.cs	Mon Nov 07 18:42:01 2016 +0900
@@ -4,12 +4,19 @@
 
 public class StageManager : MonoBehaviour {
 
+	public static StageManager Instance;
 	// stages["Attribute"]で取れる
 	public System.Collections.Generic.List<GameObject> stages = new System.Collections.Generic.List<GameObject>();
 	private GameObject baseStage;
 
 	public  System.Collections.Generic.List<Vector3> StageData = new System.Collections.Generic.List<Vector3> ();
 
+	void Awake () {
+		if (Instance == null) {
+			Instance = this;
+		}
+	}
+
 	// Use this for initialization
 	void Start () {
 		Init ();
@@ -24,7 +31,7 @@
 	}
 
 	void SetStage () {
-		object[] objects = Resources.LoadAll ("Prefabs");
+		object[] objects = Resources.LoadAll ("Prefabs/Object");
 		foreach (var obj in objects) {
 			GameObject gbj = (GameObject)obj;
 			stages.Add(gbj);