Package tripleplay.game.trans
Class SlideTransition
Slides the old screen off, and the new screen on right behind.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.game.ScreenStack.Transition
ScreenStack.Transition.Dir
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
complete
(ScreenStack.Screen oscreen, ScreenStack.Screen nscreen) Called when the transition is complete.down()
void
init
(Platform plat, ScreenStack.Screen oscreen, ScreenStack.Screen nscreen) Allows the transition to pre-compute useful values.left()
right()
up()
boolean
update
(ScreenStack.Screen oscreen, ScreenStack.Screen nscreen, float elapsed) Called every frame to update the transitionMethods inherited from class tripleplay.game.trans.InterpedTransition
easeIn, easeInOut, easeOut, interp, linear
Methods inherited from class tripleplay.game.trans.AbstractTransition
duration, onComplete, onStart
-
Constructor Details
-
SlideTransition
-
-
Method Details
-
up
-
down
-
left
-
right
-
dir
-
init
Description copied from class:ScreenStack.Transition
Allows the transition to pre-compute useful values. This will immediately be followed by call toScreenStack.Transition.update(tripleplay.game.ScreenStack.Screen, tripleplay.game.ScreenStack.Screen, float)
with an elapsed time of zero.- Overrides:
init
in classAbstractTransition<SlideTransition>
-
update
Description copied from class:ScreenStack.Transition
Called every frame to update the transition- Specified by:
update
in classScreenStack.Transition
- Parameters:
oscreen
- the outgoing screen.nscreen
- the incoming screen.elapsed
- the elapsed time since the transition started (in millis if that's what your game is sending toScreenStack.Screen.update
).- Returns:
- false if the transition is not yet complete, true when it is complete.
-
complete
Description copied from class:ScreenStack.Transition
Called when the transition is complete. This is where the transition should clean up any temporary bits and restore the screens to their original state. The stack will automatically destroy/hide the old screen after calling this method. Also note that this method may be called before the transition signals completion, if a new transition is started and this transition needs be aborted.- Overrides:
complete
in classAbstractTransition<SlideTransition>
-