private void Awake() { #region Singleton if (Instance == null) { Instance = this; } else { Destroy(gameObject); } #endregion if (isHub) { CombinedGrid = new GridClass(5, 16, 1, "GameGrid"); } else { CombinedGrid = new GridClass(5, 30, 1, "GameGrid"); } PopulatePrefabs(); designer = FindObjectOfType <Designer>(); designer?.ClearLevel(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); //if(GUILayout.Button("Draw Grid")) //{ // designer.DrawBackground(); //} if (GUILayout.Button("Load Level")) { designer.LoadLevel(); } if (GUILayout.Button("Save Level")) { designer.SaveLevel(); } if (GUILayout.Button("Clear Level")) { designer.ClearLevel(); } }
private void Start() { if (isDesigner) { designer.ClearLevel(); Player.gameObject.SetActive(true); designer.background.SetActive(false); } CameraS.CreateLevel += SpawnNewLevel; if (isTestMode) { TestGameSetup(); } else if (isHub) { HubSetup(); } else { NewGameSetup(); } }