private void DrawWavesSummary() { EditorGUILayout.LabelField("Summary", EditorStyles.boldLabel); CustomeGUIUtility.DrawReadonlyProperty("All waves spawn duration", $"{waveSystem.GetAllWavesDuration()} s"); CustomeGUIUtility.DrawReadonlyProperty("Enemies count in all waves", $"{waveSystem.GetEnemiesCountInAllWaves()}"); if (EditorApplication.isPlaying) { Repaint(); EditorGUILayout.LabelField("Current Wave Stats", EditorStyles.boldLabel); var progressBarRect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight); var enemiesLeft = waveSystem.AliveEnemies; var enemiesInWave = waveSystem.EnemiesInCurrentWave; CustomeGUIUtility.DrawReadonlyProperty("Current wave", $"{waveSystem.CurrentWaveNumber} / {waveSystem.MaxWaves}"); var nextWaveTime = Mathf.Round(waveSystem.NextWaveStartTime); CustomeGUIUtility.DrawReadonlyProperty("Time to next wave", $"{nextWaveTime} s"); EditorGUI.ProgressBar(progressBarRect, enemiesInWave == 0 ? 0 : enemiesLeft / enemiesInWave, $"enemies {enemiesLeft} / {enemiesInWave}"); } }