public void StopAllTweensWithTarget(object target, bool shouldCompleteTweens = false) { for (int i = activeTweens.Count - 1; i >= 0; i--) { if (activeTweens[i] is ITweenControl) { ITweenControl control = activeTweens[i] as ITweenControl; if (control.GetTargetObject() == target) { control.Stop(shouldCompleteTweens); } } } }
public List <ITweenable> GetAllTweensWithTarget(object target) { List <ITweenable> foundTweens = new List <ITweenable>(); for (int i = 0; i < activeTweens.Count; i++) { if (activeTweens[i] is ITweenControl) { ITweenControl control = activeTweens[i] as ITweenControl; if (control.GetTargetObject() == target) { foundTweens.Add(activeTweens[i] as ITweenable); } } } return(foundTweens); }