Class FloatGlider
java.lang.Object
com.github.yellowstonegames.smooth.Glider
com.github.yellowstonegames.smooth.FloatGlider
Allows specifying a smoothly-changing float value using any float for the start and the end, with a change
amount that affects how far the value has changed from start to end. Typical usage sets the start with
This is a type of Glider, and so is compatible with other Gliders (it can also be merged with them).
setStart(float) once and the end more than once with setEnd(float), changing the end each time the
transition is complete. The value is automatically calculated in getValue(), and its value will be different
every time Glider.setChange(float) is called with a different amount. You can
optionally use an Interpolations.Interpolator to make the rate of change different.
This is a type of Glider, and so is compatible with other Gliders (it can also be merged with them).
-
Nested Class Summary
Nested classes/interfaces inherited from class Glider
Glider.Changer -
Field Summary
Fields inherited from class Glider
change, changers, completeRunner, interpolation -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Glider
addChanger, addChangers, addChangers, equals, getChange, getCompleteRunner, getEndFloat, getEndInt, getFloat, getInt, getInterpolation, getStartFloat, getStartInt, hashCode, merge, onComplete, removeChanger, resetToCurrent, setChange, setCompleteRunner, setEndFloat, setEndInt, setInterpolation, setStartFloat, setStartInt
-
Constructor Details
-
FloatGlider
public FloatGlider() -
FloatGlider
public FloatGlider(float start) -
FloatGlider
public FloatGlider(float start, float end)
-
-
Method Details
-
getValue
public float getValue() -
getStart
public float getStart() -
setStart
public void setStart(float start) -
getEnd
public float getEnd() -
setEnd
public void setEnd(float end)
-