/// <summary> /// Removes an <see cref="AnimatorBase"/> which acts as a child of this instance. /// </summary> /// <param name="animator">Child to be removed.</param> protected void RemoveChildAnimator(AnimatorBase animator) { if (animator == null) { throw new ArgumentNullException("animator"); } if (_childAnimators.Contains(animator)) { _childAnimators.Remove(animator); } }
/// <summary> /// Adds an <see cref="AnimatorBase"/> which acts as a child of this instance. /// Thus its <see cref="Intervall"/>, <see cref="StepSize"/>, <see cref="LoopMode"/> /// and <see cref="SynchronizationMode"/> will be set accordingly to and synchronized /// with the settings of this instance. /// </summary> /// <param name="animator">Child to add.</param> protected void AddChildAnimator(AnimatorBase animator) { if (animator == null) { throw new ArgumentNullException("animator"); } if (!_childAnimators.Contains(animator)) { _childAnimators.Add(animator); } animator.SetIntervall(this.Intervall, false); animator.SetStepSize(this.StepSize, false); animator.SetLoopMode(this.LoopMode, false); animator.SetSynchronizationMode(this.SynchronizationMode, false); }