public Rotation(AbstractComponent guiComponent, List<GuiAnimation> animations, float value)
     : base(guiComponent, animations)
 {
     _value = value%360 < 0 ? 360 + value%360 : value%360;
     _multiplicator = CalculateMultiplicator();
     AnimationEnd += component => component.Transform.Rotation = _value;
 }
Exemple #2
0
 public Red(AbstractComponent guiComponent, List<GuiAnimation> animations, float value)
     : base(guiComponent, animations)
 {
     _value = value;
     _multiplicator = _value < GuiComponent.Style.Red ? -1 : 1;
     AnimationEnd += component => component.Style.Red = _value;
 }
 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());
 }
 public Content(AbstractComponent guiComponent, List<GuiAnimation> animations, float fps)
     : base(guiComponent, animations)
 {
     _fps = fps;
     _startTime = Time.time;
 }
 public GuiAnimation(AbstractComponent guiComponent, List<GuiAnimation> animations)
 {
     GuiComponent = guiComponent;
     _animations = animations;
 }
Exemple #7
0
 public Style(AbstractComponent guiComponent, List<GuiAnimation> animations, float fps)
     : base(guiComponent, animations, fps)
 {
 }