예제 #1
0
파일: TimeLine.cs 프로젝트: pontura/amibots
    void AddKeyframe(KeyframeBase _keyframe)
    {
        int idToChange = -1;
        int id         = 0;

        foreach (KeyframeBase keyFrame in activeScenesTimeline.keyframes)
        {
            if (keyFrame.avatar.avatarID == _keyframe.avatar.avatarID && keyFrame.time == _keyframe.time)
            {
                idToChange = id;
            }
            id++;
        }
        ScenesTimeline st = activeScenesTimeline;

        if (idToChange != -1 && st.keyframes.Count >= idToChange)
        {
            st.keyframes[idToChange] = _keyframe;
        }
        else
        {
            GetActiveScenesTimeline().keyframes.Add(_keyframe);
        }
    }