Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_DURATION |
Constructor and Description |
---|
SlideIn()
Slide in from bottom of screen with
DEFAULT_DURATION |
SlideIn(float duration)
Slide in from bottom of screen with specific duration
|
SlideIn(SlideDirection direction)
Slide in from outside of the screen with
DEFAULT_DURATION |
SlideIn(SlideDirection direction,
float duration)
Slide in from outside of the screen with specific duration
|
Modifier and Type | Method and Description |
---|---|
float |
getDuration() |
float |
getSpeed() |
boolean |
isFinished()
True if the effect has completed and should be removed from the
UiElement |
void |
postEnd(UiElement element)
Called after the effect ends
|
void |
postRender(Graphics g)
Called after rendering the
UiElement |
void |
preBegin(UiElement element)
Called before the effect begins
|
void |
preRender(Graphics g)
Called before rendering the
UiElement |
boolean |
update(UiContainerRenderTree uiContainer,
CollisionBox currentArea,
Rectangle targetArea,
float delta)
Updates the effect
|
public static final float DEFAULT_DURATION
public SlideIn()
DEFAULT_DURATION
public SlideIn(float duration)
duration
- The duration of the animation in secondspublic SlideIn(SlideDirection direction)
DEFAULT_DURATION
direction
- The slide direction. Note that this is the direction that the
UiElement
movespublic SlideIn(SlideDirection direction, float duration)
direction
- The slide direction. Note that this is the direction that the
UiElement
movesduration
- The duration of the animation in secondspublic boolean update(UiContainerRenderTree uiContainer, CollisionBox currentArea, Rectangle targetArea, float delta)
UiEffect
update
in interface UiEffect
uiContainer
- The UiContainerRenderTree
the UiElement
belongs tocurrentArea
- The current area that the UiElement
is set to render
in. Manipulate this to change where the element renders.targetArea
- The target area that the UiElement
is set to render in
as specified by the render tree and layout.delta
- The frame deltaUiElement
should be renderedpublic void preBegin(UiElement element)
UiEffect
public void postEnd(UiElement element)
UiEffect
public void preRender(Graphics g)
UiEffect
UiElement
public void postRender(Graphics g)
UiEffect
UiElement
postRender
in interface UiEffect
g
- The Graphics
contextpublic boolean isFinished()
UiEffect
UiElement
isFinished
in interface UiEffect
public float getDuration()
public float getSpeed()