FlixelTweenSettings
View sourceclass
org.flixelgdx.tween.settings.FlixelTweenSettings
Class for holding basic data, containing configurations to be used on a FlixelTween.
Constructors
FlixelTweenSettings()
FlixelTweenSettings(FlixelTweenType)
Parameters:
| Name | Description |
|---|---|
type | The type of tween it should be. |
FlixelTweenSettings(FlixelTweenType, FlixelEaseFunction)
Parameters:
| Name | Description |
|---|---|
type | The type of tween it should be. |
ease | The easer function the tween should use (aka how it should be animated). |
Methods
addGoal(FlixelTweenGoalGetter, float, FlixelTweenGoalSetter)
Adds a new tween goal that tweens a value via a getter and setter.
The getter is called once at tween start to capture the initial value. Each subsequent update interpolates from that captured value toward toValue and passes the result to the setter.
Parameters:
| Name | Description |
|---|---|
getter | Supplies the current value of the property at tween start. |
toValue | The value to tween the property to. |
setter | Consumes the interpolated value on every tween update. |
Returns: this tween settings object for chaining.
setDuration(float)
Sets the duration of how long the tween should last for.
Parameters:
| Name | Description |
|---|---|
duration | The new value to set. |
Returns: this tween settings object for chaining.
getDuration()
getType()
getEase()
getOnStart()
getOnUpdate()
getOnComplete()
getGoals()
getLoopDelay()
getStartDelay()
getFramerate()
setEase(FlixelEaseFunction)
clearGoals()
setStartDelay(float)
setLoopDelay(float)
setFramerate(float)
setType(FlixelTweenType)
setOnStart(FlixelEaseStartCallback)
setOnUpdate(FlixelEaseUpdateCallback)
setOnComplete(FlixelEaseCompleteCallback)
forEachGoal(FlixelTweenGoalVisitor)
FlixelTweenGoal
record
org.flixelgdx.tween.settings.FlixelTweenSettings.FlixelTweenGoal
A record containing a getter, a target value, and a setter for a property-based tween goal.
Constructors
FlixelTweenGoal(FloatSupplier, float, FlixelTweenGoalSetter)
Parameters:
| Name | Description |
|---|---|
getter | Supplies the initial value of the property when the tween starts. |
toValue | The value to tween the property to. |
setter | Consumes the interpolated value on every tween update. |
Methods
toString()
hashCode()
equals(Object)
getter()
toValue()
setter()
FlixelTweenGoalVisitor
interface
org.flixelgdx.tween.settings.FlixelTweenSettings.FlixelTweenGoalVisitor
A functional interface for visiting each goal in this tween settings object.