Package dev.kosmx.playerAnim.core.data
Class KeyframeAnimation.StateCollection.State
java.lang.Object
dev.kosmx.playerAnim.core.data.KeyframeAnimation.StateCollection.State
- Enclosing class:
KeyframeAnimation.StateCollection
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddKeyFrame(int tick, float value, Ease ease) Add a new keyframe to the emotebooleanaddKeyFrame(int tick, float value, Ease ease, int rotate, boolean degrees) Add a new keyframe to the emotebooleanaddKeyFrame(int tick, float value, Ease ease, int rotate, boolean degrees, Float easingArg) Add a new keyframe to the emotebooleanaddKeyFrame(int tick, float value, Ease ease, Float easingArg) Add a new keyframe to the emotecopy()booleanintfindAtTick(int tick) Find the last keyframe's number before the tickinthashCode()intlength()voidlockAndVerify(int maxLength) Locks the object, throws exception if contains invalid datavoidreplace(KeyframeAnimation.KeyFrame keyFrame, int pos) voidreplaceEase(int pos, Ease ease) voidsetEnabled(boolean newValue)
-
Field Details
-
defaultValue
public final float defaultValue -
threshold
public final float threshold -
name
-
-
Constructor Details
-
State
Creates a mutable copy- Parameters:
state- deep copy this, non-null
-
-
Method Details
-
equals
-
lockAndVerify
public void lockAndVerify(int maxLength) Locks the object, throws exception if contains invalid data- Parameters:
maxLength- length of animation
-
setEnabled
public void setEnabled(boolean newValue) -
hashCode
public int hashCode() -
length
public int length() -
findAtTick
public int findAtTick(int tick) Find the last keyframe's number before the tick- Parameters:
tick- tick- Returns:
- given keyframe
-
addKeyFrame
Add a new keyframe to the emote- Parameters:
tick- wherevalue- what valueease- with what easingrotate- 360 degrees turndegrees- is the value in degrees (or radians if false)- Returns:
- is the keyframe valid
-
addKeyFrame
public boolean addKeyFrame(int tick, float value, Ease ease, int rotate, boolean degrees, Float easingArg) Add a new keyframe to the emote- Parameters:
tick- wherevalue- what valueease- with what easingrotate- 360 degrees turndegrees- is the value in degrees (or radians if false)easingArg- self-explanatory- Returns:
- is the keyframe valid
-
addKeyFrame
Add a new keyframe to the emote- Parameters:
tick- wherevalue- what valueease- with what easing- Returns:
- is the keyframe valid
-
addKeyFrame
Add a new keyframe to the emote- Parameters:
tick- wherevalue- what valueease- with what easingeasingArg- self-explanatory- Returns:
- is the keyframe valid
-
replace
-
replaceEase
-
copy
-