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); }
public void UnregisterAnimationSet(AnimationSet set) { registeredSets.Remove(set); foreach (var keyVal in trackSet) { if (keyVal.Value == set) { trackSet.Remove(keyVal.Key); break; } } }
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); }
public void SetTrackAnimationSet(int track, AnimationSet set) { trackSet.Add(track, set); }
public void RegisterAnimationSet(AnimationSet set) { registeredSets.Add(set); }