Interface Tweenable

All Known Implementing Classes:
CheckBox, CollisionBox, CollisionEntity, CombatEntity, Creature, DropdownListField, Emitter, Entity, EntityEmitter, GameScreen, GuiComponent, HorizontalSlider, ImageComponent, ImageComponentList, LightSource, ListField, MapArea, Menu, MouseDrawComponent, NumberAdjuster, Prop, Screen, Slider, SoundPlayback.VolumeControl, SoundSource, Spawnpoint, StaticShadow, TextFieldComponent, Trigger, VerticalSlider

public interface Tweenable
The Tweenable interface allows modifying an object's attributes smoothly over time using Tween instances managed by the TweenEngine.
  • Method Summary

    Modifier and TypeMethodDescription
    default float[]getTweenValues​(TweenType tweenType)
    Gets one or many values from the target object associated to the given tween type.
    default voidsetTweenValues​(TweenType tweenType, float[] newValues)
    This method is called in a Tween's update() method to set the new interpolated values.
  • Method Details

    • getTweenValues

      default float[] getTweenValues​(TweenType tweenType)
      Gets one or many values from the target object associated to the given tween type. It is used by the Tween Engine to determine starting values.
      Parameters:
      tweenType - The tween type of this interpolation, determining which values are modified.
      Returns:
      The array of current tween values.
    • setTweenValues

      default void setTweenValues​(TweenType tweenType, float[] newValues)
      This method is called in a Tween's update() method to set the new interpolated values.
      Parameters:
      tweenType - The tween type of this interpolation, determining which values are modified.
      newValues - The new values determined by the tween equation.