public static void ShowWindow(string logicDataName, string logicFileUseType) { StateMachineEditorWindow.OpenWindow(); LogicSystemEditorWindow.logicDataName = logicDataName; LogicSystemEditorWindow.logicFileUseType = logicFileUseType; LogicSystemEditorWindow.Init(); }
public static void OpenWindow() { if (Instance == null) { Instance = GetWindow <StateMachineEditorWindow>(); Instance.Show(); Instance.Focus(); } Instance.OnDestroy(); }
public static void AddNewTransitionGUI(MachineState from, MachineState to) { StateTransition st = StateTransitionDataControl.AddNewStateTransition(from, to); StateTransitionArrowLineDataControl.AddStateTransitionToCreateArrowLine(st); if (StateMachineEditorWindow.OnAddStateTransition != null) { StateMachineEditorWindow.OnAddStateTransition(st); } }
public static MachineStateGUI AddNewMachineStateGUI(Vector2 postion, string name = null, bool isTriggerCreateEvent = true) { MachineState ms = StateMachineDataControl.AddNewMachineState(); MachineStateGUI msg = MachineStateGUIDataControl.AddNewMachineStateGUI(ms, postion, name); if (isTriggerCreateEvent && StateMachineEditorWindow.OnCreateMachineStateGUI != null) { StateMachineEditorWindow.OnCreateMachineStateGUI(msg); } return(msg); }
public static void DeleteStateTransitionArrowLine(StateTransitionArrowLine line) { bool res = StateTransitionArrowLineDataControl.DeleteStateTransitionArrowLine(line); if (res) { if (StateMachineEditorWindow.OnDeleteStateTransitionArrowLine != null) { StateMachineEditorWindow.OnDeleteStateTransitionArrowLine(line); } } }
public static void DeleteMachineStateGUI(MachineStateGUI state) { bool res = MachineStateGUIDataControl.DeleteMachineStateGUI(state); if (res) { if (StateMachineEditorWindow.OnDeleteMachineStateGUI != null) { StateMachineEditorWindow.OnDeleteMachineStateGUI(state); } } }
public static void DeleteStateTransition(StateTransitionArrowLine line, StateTransition st) { if (line.transitions.Contains(st)) { if (line.transitions.Count == 1) { StateTransitionArrowLineDataControl.DeleteStateTransitionArrowLine(line); } else { StateTransitionDataControl.DeleteStateTransition(st); line.transitions.Remove(st); } if (StateMachineEditorWindow.OnDeleteStateTransition != null) { StateMachineEditorWindow.OnDeleteStateTransition(st); } } }
void OnEnable() { Instance = this; }