public bool DrawStrategy(Dictionary <string, Type> types) { bool update = false; EditorGUILayout.BeginVertical("Box"); int choice = EditorGUILayout.Popup(this.choice, types.Keys.ToArray()); EditorGUI.indentLevel++; strategy.InspectorDraw(); EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); if (choice != this.choice) { string name = types.Keys.ToArray()[choice]; strategy = (TechStrategyOptions)ScriptableObject.CreateInstance(types[name]); this.choice = choice; update = true; } return(update); }
public StrategyEntry(int c, TechStrategyOptions s) { choice = c; strategy = s; }