Class Actions
java.lang.Object
com.prineside.tdi2.scene2d.actions.Actions
Static convenience methods for using pooled actions, intended for static import.
- Author:
- Nathan Sweet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Action>
TReturns a new or pooled action of the specified type.static AddActionstatic AddActionstatic AddListenerActionaddListener(EventListener listener, boolean capture) static AddListenerActionaddListener(EventListener listener, boolean capture, Actor targetActor) static AfterActionstatic AlphaActionalpha(float a) Sets the actor's alpha instantly.static AlphaActionalpha(float a, float duration) Transitions from the alpha at the time this action starts to the specified alpha.static AlphaActionalpha(float a, float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to the specified alpha.static ColorActionSets the actor's color instantly.static ColorActionTransitions from the color at the time this action starts to the specified color.static ColorActioncolor(Color color, float duration, Interpolation interpolation) Transitions from the color at the time this action starts to the specified color.static DelayActiondelay(float duration) static DelayActionstatic AlphaActionfadeIn(float duration) Transitions from the alpha at the time this action starts to an alpha of 1.static AlphaActionfadeIn(float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to an alpha of 1.static AlphaActionfadeOut(float duration) Transitions from the alpha at the time this action starts to an alpha of 0.static AlphaActionfadeOut(float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to an alpha of 0.static RepeatActionstatic VisibleActionhide()static LayoutActionlayout(boolean enabled) static MoveByActionmoveBy(float amountX, float amountY) Moves the actor instantly.static MoveByActionmoveBy(float amountX, float amountY, float duration) static MoveByActionmoveBy(float amountX, float amountY, float duration, Interpolation interpolation) static MoveToActionmoveTo(float x, float y) Moves the actor instantly.static MoveToActionmoveTo(float x, float y, float duration) static MoveToActionmoveTo(float x, float y, float duration, Interpolation interpolation) static MoveToActionmoveToAligned(float x, float y, int alignment) static MoveToActionmoveToAligned(float x, float y, int alignment, float duration) static MoveToActionmoveToAligned(float x, float y, int alignment, float duration, Interpolation interpolation) static ParallelActionparallel()static ParallelActionstatic ParallelActionstatic ParallelActionstatic ParallelActionstatic ParallelActionstatic ParallelActionstatic RemoveActionremoveAction(Action action) static RemoveActionremoveAction(Action action, Actor targetActor) static RemoveActorActionstatic RemoveActorActionremoveActor(Actor removeActor) static RemoveListenerActionremoveListener(EventListener listener, boolean capture) static RemoveListenerActionremoveListener(EventListener listener, boolean capture, Actor targetActor) static RepeatActionstatic RotateByActionrotateBy(float rotationAmount) Rotates the actor instantly.static RotateByActionrotateBy(float rotationAmount, float duration) static RotateByActionrotateBy(float rotationAmount, float duration, Interpolation interpolation) static RotateToActionrotateTo(float rotation) Rotates the actor instantly.static RotateToActionrotateTo(float rotation, float duration) static RotateToActionrotateTo(float rotation, float duration, Interpolation interpolation) static RunnableActionstatic ScaleByActionscaleBy(float amountX, float amountY) Scales the actor instantly.static ScaleByActionscaleBy(float amountX, float amountY, float duration) static ScaleByActionscaleBy(float amountX, float amountY, float duration, Interpolation interpolation) static ScaleToActionscaleTo(float x, float y) Scales the actor instantly.static ScaleToActionscaleTo(float x, float y, float duration) static ScaleToActionscaleTo(float x, float y, float duration, Interpolation interpolation) static SequenceActionsequence()static SequenceActionstatic SequenceActionstatic SequenceActionstatic SequenceActionstatic SequenceActionstatic SequenceActionstatic VisibleActionshow()static SizeByActionsizeBy(float amountX, float amountY) Sizes the actor instantly.static SizeByActionsizeBy(float amountX, float amountY, float duration) static SizeByActionsizeBy(float amountX, float amountY, float duration, Interpolation interpolation) static SizeToActionsizeTo(float x, float y) Sizes the actor instantly.static SizeToActionsizeTo(float x, float y, float duration) static SizeToActionsizeTo(float x, float y, float duration, Interpolation interpolation) static ActionSets the target of an action and returns the action.static TimeScaleActionstatic TouchableActionstatic VisibleActionvisible(boolean visible)
-
Constructor Details
-
Actions
public Actions()
-
-
Method Details
-
action
Returns a new or pooled action of the specified type. -
addAction
-
addAction
-
removeAction
-
removeAction
-
moveTo
Moves the actor instantly. -
moveTo
-
moveTo
public static MoveToAction moveTo(float x, float y, float duration, @Null Interpolation interpolation) -
moveToAligned
-
moveToAligned
-
moveToAligned
public static MoveToAction moveToAligned(float x, float y, int alignment, float duration, @Null Interpolation interpolation) -
moveBy
Moves the actor instantly. -
moveBy
-
moveBy
public static MoveByAction moveBy(float amountX, float amountY, float duration, @Null Interpolation interpolation) -
sizeTo
Sizes the actor instantly. -
sizeTo
-
sizeTo
public static SizeToAction sizeTo(float x, float y, float duration, @Null Interpolation interpolation) -
sizeBy
Sizes the actor instantly. -
sizeBy
-
sizeBy
public static SizeByAction sizeBy(float amountX, float amountY, float duration, @Null Interpolation interpolation) -
scaleTo
Scales the actor instantly. -
scaleTo
-
scaleTo
public static ScaleToAction scaleTo(float x, float y, float duration, @Null Interpolation interpolation) -
scaleBy
Scales the actor instantly. -
scaleBy
-
scaleBy
public static ScaleByAction scaleBy(float amountX, float amountY, float duration, @Null Interpolation interpolation) -
rotateTo
Rotates the actor instantly. -
rotateTo
-
rotateTo
public static RotateToAction rotateTo(float rotation, float duration, @Null Interpolation interpolation) -
rotateBy
Rotates the actor instantly. -
rotateBy
-
rotateBy
public static RotateByAction rotateBy(float rotationAmount, float duration, @Null Interpolation interpolation) -
color
Sets the actor's color instantly. -
color
Transitions from the color at the time this action starts to the specified color. -
color
Transitions from the color at the time this action starts to the specified color. -
alpha
Sets the actor's alpha instantly. -
alpha
Transitions from the alpha at the time this action starts to the specified alpha. -
alpha
Transitions from the alpha at the time this action starts to the specified alpha. -
fadeOut
Transitions from the alpha at the time this action starts to an alpha of 0. -
fadeOut
Transitions from the alpha at the time this action starts to an alpha of 0. -
fadeIn
Transitions from the alpha at the time this action starts to an alpha of 1. -
fadeIn
Transitions from the alpha at the time this action starts to an alpha of 1. -
show
-
hide
-
visible
-
touchable
-
removeActor
-
removeActor
-
delay
-
delay
-
timeScale
-
sequence
-
sequence
-
sequence
-
sequence
public static SequenceAction sequence(Action action1, Action action2, Action action3, Action action4) -
sequence
-
sequence
-
sequence
-
parallel
-
parallel
-
parallel
-
parallel
public static ParallelAction parallel(Action action1, Action action2, Action action3, Action action4) -
parallel
-
parallel
-
parallel
-
repeat
-
forever
-
run
-
layout
-
after
-
addListener
-
addListener
public static AddListenerAction addListener(EventListener listener, boolean capture, Actor targetActor) -
removeListener
-
removeListener
public static RemoveListenerAction removeListener(EventListener listener, boolean capture, Actor targetActor) -
targeting
Sets the target of an action and returns the action.- Parameters:
target- the desired target of the actionaction- the action on which to set the target- Returns:
- the action with its target set
-