void startPos() { if (LoadingScript.Instance.loading) { return; } if (!isLocalPlayer) { return; } GenerateDungeon temp = GameObject.Find("DungeonGen").GetComponent <GenerateDungeon>(); switch (Random.Range(0, 4)) { case 0: transform.position = temp.spawnLocal.transform.position; break; case 1: transform.position = temp.spawnLocal1.transform.position; break; case 2: transform.position = temp.spawnLocal2.transform.position; break; case 3: transform.position = temp.spawnLocal3.transform.position; break; } CancelInvoke(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); GenerateDungeon script = (GenerateDungeon)target; if (GUILayout.Button("Generate Dungeon")) { script.GenerateNewDungeon(); } }
void Awake() { Instance = this; }
private void Awake() { Instance = this; objects = new List <GameObject>(); }