Пример #1
0
        private void RegisterAnimationSet(AnimationSet animationSet, int id, IRenderObject renderObject)
        {
            AnimationController animationController = renderObject.AnimationController;

            animationController.RegisterAnimationSet(animationSet);
            animationController.SetTrackAnimationSet(id, animationSet);
            animationController.SetTrackWeight(id, 1);
            animationController.SetTrackSpeed(id, 0);
            animationController.SetTrackPosition(id, 0);
            animationController.SetTrackPriority(id, TrackPriority.High);
        }
Пример #2
0
 public void UnregisterAnimationSet(AnimationSet set)
 {
     registeredSets.Remove(set);
     foreach (var keyVal in trackSet)
     {
         if (keyVal.Value == set)
         {
             trackSet.Remove(keyVal.Key);
             break;
         }
     }
 }
Пример #3
0
        public int AddAnimationSet(AnimationSet animationSet)
        {
            int id;

            if (animationFreeIds.Count > 0)
            {
                id = animationFreeIds[0];
                animationFreeIds.RemoveAt(0);
            }
            else
            {
                id = animationSets.Count;
            }

            animationSets.Add(id, animationSet);

            foreach (var pair in renderObjects)
            {
                RegisterAnimationSet(animationSet, id, pair.Value);
            }

            Render();
            return(id);
        }
Пример #4
0
 public void SetTrackAnimationSet(int track, AnimationSet set)
 {
     trackSet.Add(track, set);
 }
Пример #5
0
 public void RegisterAnimationSet(AnimationSet set)
 {
     registeredSets.Add(set);
 }