private void OnFsmBreakpointSet(BaseFsm fsm, object state) { #if PLAYMAKER var pair = GetTrackingPair(fsm); if (pair == null || pair.view == null) { return; } // Been set from code so update PlayMaker if (!pair.settingPlayMakerBreakpoint) { var targetStateName = pair.fsmIntrospection.StateFromEnumState(state); foreach (var fsmState in pair.view.FsmStates) { if (fsmState.Name == targetStateName) { pair.currentEnterBreakpoints.Add(fsmState); fsmState.IsBreakpoint = true; } } } #endif if (WantRepaint != null) { WantRepaint(); } }
private TrackingPair GetTrackingPair(BaseFsm fsm) { if (tracking == null) { return(null); } foreach (var pair in tracking) { if (pair.targetFsm == fsm) { return(pair); } } return(null); }
private void OnFsmBreakpointHit(BaseFsm fsm, object state) { #if PLAYMAKER var pair = GetTrackingPair(fsm); if (pair == null || pair.view == null) { return; } // Force update UI if (pair.view != null) { var currentFsmState = pair.fsmIntrospection.State; pair.view.SetState(currentFsmState); pair.view.Fsm.Update(); if (WantRepaint != null) { WantRepaint(); } } #endif }
private void OnFsmBreakpointsReset(BaseFsm fsm) { #if PLAYMAKER var pair = GetTrackingPair(fsm); if (pair == null || pair.view == null) { return; } // Been set from code so update PlayMaker if (!pair.settingPlayMakerBreakpoint) { foreach (var state in pair.view.FsmStates) { state.IsBreakpoint = false; } if (WantRepaint != null) { WantRepaint(); } } #endif }