public RythmFactory(RythmManager manager, Dictionary <T, string> PromptMaps, T[][] prompts) { ManagerComponent = manager; Prompts = prompts; var promptTypes = Enum.GetValues(typeof(T)); if (Prompts.Length < 1) { throw new ArgumentException("Enum provided to Initialize must have at least 1 visible definition"); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); m_targetRythmManager = (RythmManager)target; if (!Application.isPlaying) { return; } EditorGUILayout.LabelField("Rythm", EditorStyles.boldLabel); EditorGUI.BeginDisabledGroup(m_targetRythmManager.HasPrompts()); if (GUILayout.Button("Spawn Prompts")) { m_targetRythmManager.SpawnPrompts(); } ; EditorGUI.EndDisabledGroup(); if (!m_targetRythmManager.HasStarted()) { if (GUILayout.Button("Start Rythm")) { m_targetRythmManager.StartRythm(); } } else { if (GUILayout.Button("Stop Rythm")) { m_targetRythmManager.StopRythm(); } } }