Ejemplo n.º 1
0
        public static void AddNewTransitionGUI(int fromStateID, int toStateID)
        {
            MachineState from = StateMachineDataControl.GetMachineState(fromStateID);
            MachineState to   = StateMachineDataControl.GetMachineState(toStateID);

            AddNewTransitionGUI(from, to);
        }
Ejemplo n.º 2
0
        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 bool DeleteMachineStateGUI(MachineStateGUI state)
 {
     if (allMachineStateGUI.Contains(state))
     {
         List <StateTransitionArrowLine> lineList = new List <StateTransitionArrowLine>();
         lineList.AddRange(state.FromArrowLines);
         lineList.AddRange(state.ToArrowLines);
         foreach (var item in lineList)
         {
             StateTransitionArrowLineDataControl.DeleteStateTransitionArrowLine(item);
         }
         lineList.Clear();
         StateMachineDataControl.DeleteMachineState(state.state);
         allMachineStateGUI.Remove(state);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
        public static void AddStateBaseBehaviour(int stateID, StateBaseBehaviour behaviour)
        {
            MachineState state = StateMachineDataControl.GetMachineState(stateID);

            AddStateBaseBehaviour(state, behaviour);
        }