public void Attach(ElementSelector selector, Action<StylingRule, double> ruleSet, AnimationSpan span) { var style = new StylingRule(); ResolveSelector(selector, style); stylingrules.Add((time) => { ruleSet(style, time); span.Update(time); }); span.OnAnimationEnd += (sender, args) => stylingrules.RemoveAt(stylingrules.Count - 1); }
public void Attach(IGuiElement element, Action<StylingRule, double> ruleSet, AnimationSpan span) { var style = new StylingRule(); AddElement(element, style, SelectorPriority.Default); stylingrules.Add((time) => { ruleSet(style, time); span.Update(time); }); span.OnAnimationEnd += (sender, args) => stylingrules.RemoveAt(stylingrules.Count - 1); }