コード例 #1
0
    public void Update()
    {
        Process();
        if (null == m_lstActionFrames || m_lstActionFrames.Count <= 0)
        {
            return;
        }

        float fRealTime = m_fRunTime;

        int nCount = m_lstActionFrames.Count;


        for (int i = nCount - 1; i >= 0; i--)
        {
            AbstractActionFrame skillFrame = m_lstActionFrames[i];

            if (null == skillFrame)
            {
                m_lstActionFrames.RemoveAt(i);
                continue;
            }

            skillFrame.Update(fRealTime);

            if (skillFrame.IsTrigger(fRealTime) && skillFrame.GetFrameState() == AbstractActionFrame.EActionFrameState.None)
            {
                skillFrame.SetFrameState(AbstractActionFrame.EActionFrameState.Excute);
                skillFrame.ExecuteBase();
            }
            else if (skillFrame.IsFinish(fRealTime) && skillFrame.GetFrameState() == AbstractActionFrame.EActionFrameState.Excute)
            {
                skillFrame.SetFrameState(AbstractActionFrame.EActionFrameState.Finish);
            }
        }
    }