Пример #1
0
        public void deleteTrack(AMTrack track, bool deleteFromGroup = true)
        {
            int id = track.id;
            int index = getTrackIndex(id);
            if(track) {
                if(mCameraSwitcher == track) mCameraSwitcher = null;
                track.destroy();
            }

            trackValues.RemoveAt(index);
            if(deleteFromGroup) deleteTrackFromGroups(id);
            sortTracks();
        }
Пример #2
0
        private void deleteTrack(AMTrack track, bool deleteFromGroup, ref List<MonoBehaviour> modifiedItems)
        {
            int id = track.id;
            int index = getTrackIndex(id);
            if(track && modifiedItems != null) {
                foreach(AMKey key in track.keys)
                    modifiedItems.Add(key);

                modifiedItems.Add(track);
            }
            if(mCameraSwitcher == track) mCameraSwitcher = null;
            trackValues.RemoveAt(index);
            if(deleteFromGroup) deleteTrackFromGroups(id);
            sortTracks();
        }
Пример #3
0
 // add translation track
 public void addTrack(int groupId, AMITarget target, Transform obj, AMTrack a)
 {
     a.setName(getTrackCount());
     a.id = getUniqueTrackID();
     a.enabled = false;
     a.SetTarget(target, obj);
     addTrack(groupId, a);
     if(a is AMCameraSwitcherTrack) mCameraSwitcher = a as AMCameraSwitcherTrack;
 }