コード例 #1
0
        /// <summary>
        /// Change the time of the marker at the given index.
        /// </summary>
        public void SetMarkerTime(int index, float time)
        {
            InputAnimationMarker marker = markers[index];

            markers.RemoveAt(index);

            int newIndex = FindMarkerInterval(time) + 1;

            marker.time = time;
            markers.Insert(newIndex, marker);
        }
コード例 #2
0
        /// <summary>
        /// Deserialize a list of markers.
        /// </summary>
        public static void ReadMarkerList(BinaryReader reader, List <InputAnimationMarker> markers)
        {
            markers.Clear();
            int count = reader.ReadInt32();

            markers.Capacity = count;
            for (int i = 0; i < count; ++i)
            {
                var marker = new InputAnimationMarker();
                marker.time = reader.ReadSingle();
                marker.name = reader.ReadString();
                markers.Add(marker);
            }
        }
コード例 #3
0
        /// <summary>
        /// Add a user-defined marker.
        /// </summary>
        public void AddMarker(InputAnimationMarker marker)
        {
            int index = FindMarkerInterval(marker.time) + 1;

            markers.Insert(index, marker);
        }