Beispiel #1
0
        public void Tick(object sender, SkillInstance instance, long delta)
        {
            m_CurTime += delta;
            int ct = m_Trigers.Count;

            for (int i = ct - 1; i >= 0; --i)
            {
                ISkillTriger triger = m_Trigers[i];
                if (!triger.Execute(sender, instance, delta, m_CurTime / 1000))
                {
                    triger.Reset();
                    m_Trigers.RemoveAt(i);
                    if (m_Trigers.Count == 0)
                    {
                        m_IsTriggered = false;
                    }
                }
            }
        }
Beispiel #2
0
        public void Tick(object sender, SkillInstance instance, long delta)
        {
            if (m_IsFinished)
            {
                return;
            }
            m_CurTime += delta;
            int ct = m_Trigers.Count;

            for (int i = ct - 1; i >= 0; --i)
            {
                ISkillTriger triger = m_Trigers[i];
                if (!triger.Execute(sender, instance, delta, m_CurTime / 1000))
                {
                    triger.Reset();
                    m_Trigers.RemoveAt(i);
                }
            }
            if (m_CurTime / 1000 > m_Duration)
            {
                m_IsFinished = true;
            }
        }