Ejemplo n.º 1
0
        private void DoTimelineBar(Skill fsm, Rect area)
        {
            if (!Application.get_isPlaying())
            {
                return;
            }
            if (fsm == null)
            {
                return;
            }
            SkillLog myLog = fsm.get_MyLog();

            if (myLog == null || myLog.get_Entries() == null)
            {
                return;
            }
            GUI.BeginGroup(area);
            float      startTime = 0f;
            SkillState fsmState  = null;

            for (int i = 0; i < myLog.get_Entries().get_Count(); i++)
            {
                SkillLogEntry fsmLogEntry = myLog.get_Entries().get_Item(i);
                if (fsmLogEntry.get_LogType() == 5)
                {
                    if (fsmLogEntry.get_Time() > this.timelineControl.VisibleRangeStart)
                    {
                        this.DrawTimelineBar(startTime, fsmLogEntry.get_Time(), fsmState);
                    }
                    fsmState = null;
                }
                if (fsmLogEntry.get_LogType() == 6)
                {
                    if (fsmLogEntry.get_Time() > this.timelineControl.VisibleRangeEnd)
                    {
                        GUI.EndGroup();
                        return;
                    }
                    fsmState  = fsmLogEntry.get_State();
                    startTime = fsmLogEntry.get_Time();
                }
                SkillLogType arg_AE_0 = fsmLogEntry.get_LogType();
                SkillLogType arg_B8_0 = fsmLogEntry.get_LogType();
            }
            if (fsmState != null)
            {
                this.DrawTimelineBar(startTime, SkillTime.get_RealtimeSinceStartup(), fsmState);
            }
            GUI.EndGroup();
        }
Ejemplo n.º 2
0
 public static void SelectLogEntry(SkillLogEntry logEntry, bool updateTime = true)
 {
     if (logEntry != null)
     {
         DebugFlow.SelectedLog           = logEntry.get_Log();
         DebugFlow.SelectedLogEntry      = logEntry;
         DebugFlow.DebugState            = logEntry.get_State();
         DebugFlow.SelectedLogEntryIndex = logEntry.GetIndex();
         if (updateTime)
         {
             DebugFlow.CurrentDebugTime  = logEntry.get_Time();
             DebugFlow.CurrentDebugFrame = logEntry.get_FrameCount();
         }
         SkillEditor.SelectState(logEntry.get_State(), true);
         if (logEntry.get_Action() != null)
         {
             SkillEditor.SelectAction(logEntry.get_Action(), true);
         }
         if (FsmEditorSettings.EnableDebugFlow && DebugFlow.SelectedLog.get_Fsm().EnableDebugFlow&& DebugFlow.SelectedLogEntryIndex < DebugFlow.lastEnterIndex)
         {
             DebugFlow.RestoreNearestVariables(logEntry);
         }
         if (DebugFlow.LogEntrySelected != null)
         {
             DebugFlow.LogEntrySelected(logEntry);
         }
         SkillEditor.Repaint(true);
     }
 }
Ejemplo n.º 3
0
        private static SkillLogEntry FindClosestLogEntry(SkillLog fsmLog, float time)
        {
            SkillLogEntry result = null;

            using (List <SkillLogEntry> .Enumerator enumerator = fsmLog.get_Entries().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillLogEntry current = enumerator.get_Current();
                    if (current.get_Time() > time)
                    {
                        break;
                    }
                    if (current.get_LogType() == 6)
                    {
                        result = current;
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 4
0
 private void LogEntrySelected(SkillLogEntry logEntry)
 {
     this.timelineControl.FrameTime(logEntry.get_Time(), 0f);
 }