public static void MakeEventGlobal(string eventName) { SkillEvent fsmEvent = SkillEvent.GetFsmEvent(eventName); SkillEditor.Builder.SetEventIsGlobal(SkillEditor.SelectedFsm, fsmEvent, true); SkillSearch.Update(SkillEditor.SelectedFsm); }
public static void BroadcastEvent(string fsmEventName) { if (!string.IsNullOrEmpty(fsmEventName)) { PlayMakerFSM.BroadcastEvent(SkillEvent.GetFsmEvent(fsmEventName)); } }
public SkillEvent AddEvent(string eventName) { this.events.Add(eventName); SkillEvent fsmEvent = SkillEvent.FindEvent(eventName) ?? SkillEvent.GetFsmEvent(eventName); fsmEvent.IsGlobal = true; return(fsmEvent); }
public static void AddTransitionToState(SkillState state, string eventName = "") { SkillEditor.RegisterUndo(Strings.get_Command_Add_Transition()); SkillTransition fsmTransition = SkillEditor.Builder.AddTransition(SkillEditor.SelectedState); fsmTransition.set_FsmEvent(SkillEvent.GetFsmEvent(eventName)); SkillEditor.Selection.SelectTransition(fsmTransition); SkillEditor.GraphView.UpdateStateSize(SkillEditor.SelectedState); SkillSearch.Update(SkillEditor.SelectedFsm); SkillEditor.SetFsmDirty(true, false); }