private static void RestoreNearestVariables(SkillLogEntry logEntry) { if (logEntry == null) { return; } if (logEntry.get_LogType() == 6 || logEntry.get_LogType() == 5) { DebugFlow.RestoreVariables(logEntry); return; } if (logEntry.get_Event() == SkillEvent.get_Finished()) { SkillLogEntry fsmLogEntry = DebugFlow.FindNextLogEntry(logEntry, new SkillLogType[] { 5 }); if (fsmLogEntry != null) { DebugFlow.RestoreVariables(fsmLogEntry); return; } } else { if (DebugFlow.SelectedLogEntryIndex == 0) { SkillLogEntry fsmLogEntry2 = DebugFlow.FindNextLogEntry(logEntry, new SkillLogType[] { 6 }); if (fsmLogEntry2 != null) { DebugFlow.RestoreVariables(fsmLogEntry2); return; } } else { SkillLogEntry fsmLogEntry3 = DebugFlow.FindPrevLogEntry(logEntry, 6); if (fsmLogEntry3 != null) { DebugFlow.RestoreVariables(fsmLogEntry3); } } } }
private void OnClickEventTarget(SkillLogEntry entry) { switch (entry.get_EventTarget().target) { case 0: case 6: break; case 1: if (entry.get_Event() != null) { GenericMenu genericMenu = new GenericMenu(); List <Skill> fsmList = SkillInfo.GetFsmList(SkillInfo.FindTransitionsUsingEvent(entry.get_Event().get_Name())); using (List <Skill> .Enumerator enumerator = fsmList.GetEnumerator()) { while (enumerator.MoveNext()) { Skill current = enumerator.get_Current(); genericMenu.AddItem(new GUIContent(Labels.GetFullFsmLabel(current)), false, new GenericMenu.MenuFunction2(SkillEditor.SelectFsm), current); } } genericMenu.ShowAsContext(); return; } break; case 2: { GameObject ownerDefaultTarget = SkillEditor.SelectedFsm.GetOwnerDefaultTarget(entry.get_EventTarget().gameObject); Skill fsm = SkillSelection.FindFsmOnGameObject(ownerDefaultTarget, entry.get_EventTarget().fsmName.get_Value()); if (fsm != null) { SkillEditor.SelectFsm(fsm); return; } break; } case 3: if (entry.get_EventTarget().fsmComponent != null) { SkillEditor.SelectFsm(entry.get_EventTarget().fsmComponent.get_Fsm()); return; } break; case 4: if (entry.get_Event() != null) { GenericMenu genericMenu2 = new GenericMenu(); List <Skill> fsmList2 = SkillInfo.GetFsmList(SkillInfo.FindTransitionsUsingEvent(entry.get_Event().get_Name())); using (List <Skill> .Enumerator enumerator2 = fsmList2.GetEnumerator()) { while (enumerator2.MoveNext()) { Skill current2 = enumerator2.get_Current(); genericMenu2.AddItem(new GUIContent(Labels.GetFullFsmLabel(current2)), false, new GenericMenu.MenuFunction2(SkillEditor.SelectFsm), current2); } } genericMenu2.ShowAsContext(); return; } break; case 5: SkillEditor.SelectFsm(entry.get_State().get_Fsm().get_Host()); break; default: return; } }