public virtual void Update(float passedTime) { if (child != null) { if (child.IsFinalized()) { child.Finish(); } if (animation.IsFinalized() || movement.IsFinalized()) { Finish(); } if (child.Animation.Status == AnimationStatus.StandBy && (animation.IsFinalized() || Animation.IsReady || movement.IsFinalized())) { child.Movement.Origin = Movement.Destiny; child.Start(); } child.Update(passedTime); } movement.Update(passedTime); animation.Position = movement.Position; animation.Update(passedTime); }
public void RemoveActualAnimatedMovement() { if (currentActions.Count > 0) { AnimatedMovement action = currentActions.Dequeue(); if (currentActions.Count == 0) { if (DefaultDirection == DefaultDirection.Right) { AddAnimatedMovement(AnimationType.StaticRight, action.Animation.Position); } else { AddAnimatedMovement(AnimationType.StaticLeft, action.Animation.Position); } } AnimatedMovement nextAction = currentActions.Peek(); nextAction.Origin = action.Movement.Position; action.Finish(); nextAction.Start(); } }