示例#1
0
    private void Start()
    {
        skillMsg = new MsgBase((ushort)CharactorEvent.eAttackBig);
        GameObject skillOne = UIManager.Instance.GetGameObject("skillone");

        skillOne.GetComponent <UIBehaviour>().AddButtonDownListener(SkillOneButtonClick);
        skillOne.GetComponent <UIBehaviour>().AddButtonUpListener(SkillOneButtonClickUp);
        skillOneSkillTime = skillOne.GetComponent <SkillTime>();

        bloodCtr = UIManager.Instance.GetGameObject("hp").GetComponent <BloodCtr>();
    }
        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();
        }
 private void DrawDebugLine()
 {
     if (Application.get_isPlaying() && this.eventType == 7)
     {
         float time;
         if (EditorApplication.get_isPaused())
         {
             GUI.set_backgroundColor(Color.get_yellow());
             time = DebugFlow.CurrentDebugTime;
         }
         else
         {
             GUI.set_backgroundColor(Color.get_white());
             time = SkillTime.get_RealtimeSinceStartup();
         }
         this.timelineControl.DrawDebugLine(time);
     }
 }
 protected void Update()
 {
     if (EditorApplication.get_isPaused())
     {
         if (Math.Abs(this.lastDebugTime - DebugFlow.CurrentDebugTime) > 1.401298E-45f)
         {
             this.lastDebugTime = DebugFlow.CurrentDebugTime;
             base.Repaint();
             return;
         }
     }
     else
     {
         if (Application.get_isPlaying())
         {
             if (this.timelineControl != null)
             {
                 this.timelineControl.SetLength(SkillTime.get_RealtimeSinceStartup());
             }
             base.Repaint();
         }
     }
 }
示例#5
0
 internal static string GetEventName(int _heroUid, SkillTime _skillTime)
 {
     return(string.Format("{0}_{1}", _heroUid, _skillTime));
 }
示例#6
0
 public static void UpdateTime()
 {
     DebugFlow.CurrentDebugTime  = SkillTime.get_RealtimeSinceStartup();
     DebugFlow.CurrentDebugFrame = Time.get_frameCount();
 }