Package arc.flabel
Class FEffect
java.lang.Object
arc.flabel.FEffect
- Direct Known Subclasses:
BlinkEffect
,EaseEffect
,FadeEffect
,GradientEffect
,JumpEffect
,RainbowEffect
,ShakeEffect
,SickEffect
,WaveEffect
,WindEffect
Abstract text effect.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Applies the effect to the given glyph.protected float
Calculates the fadeout of this effect, if any.protected float
calculateProgress
(float modifier) Calculates a linear progress dividing the total time by the given modifier.protected float
calculateProgress
(float modifier, float offset) Calculates a linear progress dividing the total time by the given modifier.protected float
calculateProgress
(float modifier, float offset, boolean pingpong) Calculates a linear progress dividing the total time by the given modifier.protected float
getLineHeight
(FLabel label) Returns the line height of the label controlling this effect.boolean
Returns whether or not this effect is finished and should be removed.protected abstract void
Called when this effect should be applied to the given glyph.void
update
(float delta)
-
Field Details
-
indexStart
public int indexStart -
indexEnd
public int indexEnd -
duration
public float duration -
endToken
-
totalTime
protected float totalTime
-
-
Constructor Details
-
FEffect
public FEffect()
-
-
Method Details
-
update
public void update(float delta) -
apply
Applies the effect to the given glyph. -
onApply
Called when this effect should be applied to the given glyph. -
isFinished
public boolean isFinished()Returns whether or not this effect is finished and should be removed. Note that effects are infinite by default. -
calculateFadeout
protected float calculateFadeout()Calculates the fadeout of this effect, if any. Only considers the second half of the duration. -
calculateProgress
protected float calculateProgress(float modifier) Calculates a linear progress dividing the total time by the given modifier. Returns a value between 0 and 1 that loops in a ping-pong mode. -
calculateProgress
protected float calculateProgress(float modifier, float offset) Calculates a linear progress dividing the total time by the given modifier. Returns a value between 0 and 1 that loops in a ping-pong mode. -
calculateProgress
protected float calculateProgress(float modifier, float offset, boolean pingpong) Calculates a linear progress dividing the total time by the given modifier. Returns a value between 0 and 1. -
getLineHeight
Returns the line height of the label controlling this effect.
-