/// <summary> /// Edit wave element /// Edit type and number of enemies /// </summary> /// <param name="_element">Element to Edit</param> void ShowWaveElementSettings(TDS_WaveElement _element) { // COLOR GUI.color = Color.blue; EditorGUILayout.HelpBox("Wave Element", MessageType.None); GUI.color = Color.white; // ENEMIES AND COUNT TDS_Enemy _enemy = null; _enemy = EditorGUILayout.ObjectField(_enemy, typeof(TDS_Enemy), false) as TDS_Enemy; if (_enemy != null && !_element.EnemiesSpawn.Any(e => e.SpawningEnemy == _enemy)) { _element.AddElement(_enemy); } for (int i = 0; i < _element.EnemiesSpawn.Count; i++) { EditorGUILayout.LabelField(_element.EnemiesSpawn[i].SpawningEnemy.PrefabName.ToString()); _element.EnemiesSpawn[i].NumberOfEnemies = EditorGUILayout.IntSlider("Enemy count", _element.EnemiesSpawn[i].NumberOfEnemies, 0, 10); GUITools.ActionButton("Remove Element", _element.RemoveElement, i, Color.white, Color.black); } }