Class SequenceGlider
java.lang.Object
com.github.yellowstonegames.smooth.Glider
com.github.yellowstonegames.smooth.SequenceGlider
- Direct Known Subclasses:
VectorSequenceGlider
Runs more than one Glider in a sequence. Each individual Glider will run one after the next, so it is
likely that you will want to use a sequence of all the same type of Glider (that is, all can have their "x"
or "color" coordinate queried and have it mean the same thing for any member of the sequence, for example).
-
Nested Class Summary
Nested classes/interfaces inherited from class Glider
Glider.Changer -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected float[]protected floatprotected Glider[]Fields inherited from class Glider
change, changers, completeRunner, interpolation -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSequenceGlider(Glider[] gliders, float[] lengths) SequenceGlider(Glider[] gliders, float[] lengths, com.github.tommyettinger.digital.Interpolations.Interpolator interpolation, Runnable completeRunner) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatgetEndFloat(String name) Looks up theend floatvalue for the Changer with the givenname.intLooks up theend intvalue for the Changer with the givenname.floatGets the current float value for the Changer with the givennameby interpolating between its start and end float values.intGets the current int value for the Changer with the givennameby interpolating between its start and end int values.com.github.tommyettinger.digital.Interpolations.InterpolatorfloatgetStartFloat(String name) Looks up thestart floatvalue for the Changer with the givenname.intgetStartInt(String name) Looks up thestart intvalue for the Changer with the givenname.inthashCode()voidsetChange(float change) voidsetEndFloat(String name, float end) voidvoidsetInterpolation(com.github.tommyettinger.digital.Interpolations.Interpolator interpolation) voidsetStartFloat(String name, float start) voidsetStartInt(String name, int start) toString()Methods inherited from class Glider
addChanger, addChangers, addChangers, getChange, getCompleteRunner, merge, onComplete, removeChanger, resetToCurrent, setCompleteRunner
-
Field Details
-
sequence
-
durations
protected float[] durations -
active
protected int active -
passed
protected float passed
-
-
Constructor Details
-
SequenceGlider
protected SequenceGlider() -
SequenceGlider
-
SequenceGlider
-
-
Method Details
-
getFloat
Description copied from class:GliderGets the current float value for the Changer with the givennameby interpolating between its start and end float values. Theinterpolationwill be applied tochangebefore it is passed to the Changer'sGlider.Changer.interpolatorF. If this cannot locate a Changer by the given name, this returnsFloat.NaN. -
getInt
Description copied from class:GliderGets the current int value for the Changer with the givennameby interpolating between its start and end int values. Theinterpolationwill be applied tochangebefore it is passed to the Changer'sGlider.Changer.interpolatorI. If this cannot locate a Changer by the given name, this returnsInteger.MIN_VALUE.- Overrides:
getIntin classGlider- Parameters:
name- the name of the Changer to look up- Returns:
- the current int value of the located Changer, or
Integer.MIN_VALUEif lookup fails
-
getStartFloat
Description copied from class:GliderLooks up thestart floatvalue for the Changer with the givenname. If this cannot locate a Changer by the given name, this returnsFloat.NaN.- Overrides:
getStartFloatin classGlider- Parameters:
name- the name of the Changer to look up- Returns:
- the start float value of the located Changer, or
Float.NaNif lookup fails
-
setStartFloat
Description copied from class:GliderSets thestart floatvalue for the Changer with the givennametostart. If this cannot locate a Changer by the given name, this does nothing. Otherwise, sets the Changer's start float value and also setsGlider.changeto 0.- Overrides:
setStartFloatin classGlider- Parameters:
name- the name of the Changer to look upstart- value to use for the located Changer's start float
-
getEndFloat
Description copied from class:GliderLooks up theend floatvalue for the Changer with the givenname. If this cannot locate a Changer by the given name, this returnsFloat.NaN.- Overrides:
getEndFloatin classGlider- Parameters:
name- the name of the Changer to look up- Returns:
- the end float value of the located Changer, or
Float.NaNif lookup fails
-
setEndFloat
Description copied from class:GliderSets theend floatvalue for the Changer with the givennametoend. If this cannot locate a Changer by the given name, this does nothing. Otherwise, sets the Changer's end float value and also setsGlider.changeto 0.- Overrides:
setEndFloatin classGlider- Parameters:
name- the name of the Changer to look upend- value to use for the located Changer's end float
-
getStartInt
Description copied from class:GliderLooks up thestart intvalue for the Changer with the givenname. If this cannot locate a Changer by the given name, this returnsInteger.MIN_VALUE.- Overrides:
getStartIntin classGlider- Parameters:
name- the name of the Changer to look up- Returns:
- the start int value of the located Changer, or
Integer.MIN_VALUEif lookup fails
-
setStartInt
Description copied from class:GliderSets thestart intvalue for the Changer with the givennametostart. If this cannot locate a Changer by the given name, this does nothing. Otherwise, sets the Changer's start int value and also setsGlider.changeto 0.- Overrides:
setStartIntin classGlider- Parameters:
name- the name of the Changer to look upstart- value to use for the located Changer's start int
-
getEndInt
Description copied from class:GliderLooks up theend intvalue for the Changer with the givenname. If this cannot locate a Changer by the given name, this returnsInteger.MIN_VALUE.- Overrides:
getEndIntin classGlider- Parameters:
name- the name of the Changer to look up- Returns:
- the end int value of the located Changer, or
Integer.MIN_VALUEif lookup fails
-
setEndInt
Description copied from class:GliderSets theend intvalue for the Changer with the givennametoend. If this cannot locate a Changer by the given name, this does nothing. Otherwise, sets the Changer's end int value and also setsGlider.changeto 0. -
setChange
-
getInterpolation
public com.github.tommyettinger.digital.Interpolations.Interpolator getInterpolation()- Overrides:
getInterpolationin classGlider
-
setInterpolation
public void setInterpolation(com.github.tommyettinger.digital.Interpolations.Interpolator interpolation) - Overrides:
setInterpolationin classGlider
-
equals
-
hashCode
-
toString
-