Ejemplo n.º 1
0
 /// <summary>
 /// update current animation ant transitions
 /// </summary>
 /// <param name="newContext"></param>
 void UpdateContext(AnimationNode newContext)
 {
     CurrentAnimation             = newContext;
     TargetAnimator.AnimationData = CurrentAnimation.MainAnimation;
     TargetAnimator.Play();
     TargetAnimator.IsRepeat = CurrentAnimation.Repeat;
 }
Ejemplo n.º 2
0
 public void RemoveAnimation(AnimationNode node)
 {
     if (animationList.Contains(node))
     {
         animationList.Remove(node);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="node"></param>
 public void AddAnimation(AnimationNode node)
 {
     if (!animationList.Contains(node))
     {
         animationList.Add(node);
     }
 }
Ejemplo n.º 4
0
        public AnimationController(AnimationNode animation)
        {
            CurrentAnimation = animation;
            animationList    = new List <AnimationNode>();
            AddAnimation(animation);

            boolDict  = new Dictionary <string, bool>();
            floatDict = new Dictionary <string, float>();
            intDict   = new Dictionary <string, int>();
        }
Ejemplo n.º 5
0
 public AnimationTransition(Predicate <AnimationController> condition, AnimationNode target)
 {
     Condition       = condition;
     TargetAnimation = target;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Set current animation and its transition
 /// </summary>
 public void SetEntry(AnimationNode node)
 {
     CurrentAnimation = node;
     AddAnimation(node);
 }