public ScaleHeight(AbstractComponent guiComponent, List<GuiAnimation> animations, float value) : base(guiComponent, animations) { _value = value; _unit = GuiComponent.Transform.Scale.Height.Unit; _multiplicator = _value < GuiComponent.Transform.Scale.Height.Value ? -1 : 1; AnimationEnd += component => component.Transform.Scale = component.Transform.Scale.SetHeight(_unit == Number.Units.Percentage ? _value.Percentage() : _value.Pixel()); }
public TranslateX(AbstractComponent guiComponent, List<GuiAnimation> animations, float value) : base(guiComponent, animations) { _value = value; _unit = GuiComponent.Transform.Position.X.Unit; _multiplicator = _value < GuiComponent.Transform.Position.X.Value ? -1 : 1; AnimationEnd += component => component.Transform.Position = component.Transform.Position.SetX(_unit == Number.Units.Percentage ? _value.Percentage() : _value.Pixel()); }