Esempio n. 1
0
        public void PruneFramesStartingAfterTimestamp(float startTimeSeconds)
        {
            int i = m_AnimationRecords.Count - 1;

            while (i >= 0)
            {
                AnimationRecord animRecord = m_AnimationRecords[i];
                animRecord.PruneAnimationFramesStartingAfterTimestamp(startTimeSeconds);
                if (animRecord.animFrames.Count == 0)
                {
                    // all frames from animation record have been removed, we can remove the record
                    m_AnimationRecords.SwapElements(i, m_AnimationRecords.Count - 1);
                    m_AnimationRecords.PopBack();
                }

                --i;
            }

            m_NumActiveAnims = 0;
            for (i = 0; i < m_AnimationRecords.Count; ++i)
            {
                if (m_AnimationRecords[i].endTime >= startTimeSeconds)
                {
                    ++m_NumActiveAnims;
                }
            }

            RecomputeRanks();
        }