/// <summary> /// overrides the <see cref="OglAnimator.Finished(OglAnimator)"/> method to set the the next <see cref="_Current"/> to the necessary value. /// </summary> /// <param name="Animator">is the child animator. </param> override public void Finished(OglAnimator Animator) { int Id = ChildAnimations.IndexOf(Animator) + 1; if (Id < ChildAnimations.Count) { ChildAnimations[Id].Device = Device; ChildAnimations[Id].Start(); _Current = Id; } else { _repeating--; if ((_repeating >= 0) || (Allways)) { Start(); } else if (Owner != null) { Owner.Finished(this); } } }
/// <summary> /// will be called if the <b>Animator</b> is a ChildAnimation. See <see cref="AnimatorSet.ChildAnimations"/>. /// </summary> /// <param name="Animator"></param> public virtual void Finished(OglAnimator Animator) { if (Owner != null) { Owner.Finished(this); } }
/// <summary> /// adds an <see cref="OglAnimator"/> to the internal list of <see cref="OglAnimator"/>s. /// This list will be played. /// </summary> /// <param name="Animator">the <b>Animator</b>, which will be added.</param> public void AddAnimator(OglAnimator Animator) { if (Animators.IndexOf(Animator) < 0) { Animators.Add(Animator); } }
private void RemoveAnimator(OglAnimator Animator) { Animators.Remove(Animator); }