private float DrawGeneralSetting(float startX, float startY) { TDE.Label(startX, startY, width, height, "Endless Mode:", "Check to enable endless mode"); instance.endlessMode = EditorGUI.Toggle(new Rect(startX + spaceX, startY, height, height), instance.endlessMode); TDE.Label(startX, startY += spaceY, width, height, "Generate On Start:", "Check to have the waves regenerated at the start of game. All preset setting will be overwritten."); if (instance.endlessMode) { TDE.Label(startX + spaceX, startY, height, height, "-", ""); } else { instance.genWaveOnStart = EditorGUI.Toggle(new Rect(startX + spaceX, startY, height, height), instance.genWaveOnStart); } TDE.Label(startX, startY += spaceY, width, height, "Start On Timer:", "Check to start the game on a timer instead of waiting for player initiation"); instance.autoStart = EditorGUI.Toggle(new Rect(startX + spaceX, startY, height, height), instance.autoStart); if (instance.autoStart) { instance.startTimer = EditorGUI.FloatField(new Rect(startX + spaceX + height + 5, startY, widthS, height), instance.startTimer); } int spawnCDType = (int)instance.spawnCDType; TDE.Label(startX, startY += spaceY, width, height, "Countdown Type:", "Spawn count down type in this level"); contL = TDE.SetupContL(spawnCDTypeLabel, spawnCDTypeTooltip); spawnCDType = EditorGUI.Popup(new Rect(startX + spaceX, startY, widthS * 2 + 5, height), new GUIContent(""), spawnCDType, contL); instance.spawnCDType = (SpawnManager._SpawnCDType)spawnCDType; cont = new GUIContent(" - Skippable", "Allow player to skip ahead and spawn the next wave"); if (instance.spawnCDType != SpawnManager._SpawnCDType.None) { instance.skippable = EditorGUI.ToggleLeft(new Rect(startX + spaceX + widthS * 2 + 10, startY, width, 15), cont, instance.skippable); } startY += spaceY * .5f; if (!instance.endlessMode) { TDE.Label(startX, startY += spaceY, width, height, "WavesList (" + instance.waveList.Count + "):", "Number of waves in the level"); if (GUI.Button(new Rect(startX + spaceX, startY, widthS, 15), "-1")) { if (instance.waveList.Count > 1) { instance.waveList.RemoveAt(instance.waveList.Count - 1); } } if (GUI.Button(new Rect(startX + spaceX + widthS + 5, startY, widthS, 15), "+1")) { instance.waveList.Add(new Wave()); } if (!instance.genWaveOnStart && !configureGenerator) { if (GUI.Button(new Rect(startX + spaceX + widthS * 2.5f, startY, widthS * 2, height), "Generate")) { instance.GenerateWave(); } } TDE.Label(window.position.width - width - 7, startY, width, height, " - Show Override Setting"); showOverrideSetting = EditorGUI.Toggle(new Rect(window.position.width - width - 20, startY, width, height), showOverrideSetting); } else { startY += spaceY; //TDE.Label(startX+spaceX, startY, width, height), "-"); } return(startY + spaceY); }