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 AddAction
static AddAction
static AddListenerAction
addListener
(EventListener listener, boolean capture) static AddListenerAction
addListener
(EventListener listener, boolean capture, Actor targetActor) static AfterAction
static AlphaAction
alpha
(float a) Sets the actor's alpha instantly.static AlphaAction
alpha
(float a, float duration) Transitions from the alpha at the time this action starts to the specified alpha.static AlphaAction
alpha
(float a, float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to the specified alpha.static ColorAction
Sets the actor's color instantly.static ColorAction
Transitions from the color at the time this action starts to the specified color.static ColorAction
color
(Color color, float duration, Interpolation interpolation) Transitions from the color at the time this action starts to the specified color.static DelayAction
delay
(float duration) static DelayAction
static AlphaAction
fadeIn
(float duration) Transitions from the alpha at the time this action starts to an alpha of 1.static AlphaAction
fadeIn
(float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to an alpha of 1.static AlphaAction
fadeOut
(float duration) Transitions from the alpha at the time this action starts to an alpha of 0.static AlphaAction
fadeOut
(float duration, Interpolation interpolation) Transitions from the alpha at the time this action starts to an alpha of 0.static RepeatAction
static VisibleAction
hide()
static LayoutAction
layout
(boolean enabled) static MoveByAction
moveBy
(float amountX, float amountY) Moves the actor instantly.static MoveByAction
moveBy
(float amountX, float amountY, float duration) static MoveByAction
moveBy
(float amountX, float amountY, float duration, Interpolation interpolation) static MoveToAction
moveTo
(float x, float y) Moves the actor instantly.static MoveToAction
moveTo
(float x, float y, float duration) static MoveToAction
moveTo
(float x, float y, float duration, Interpolation interpolation) static MoveToAction
moveToAligned
(float x, float y, int alignment) static MoveToAction
moveToAligned
(float x, float y, int alignment, float duration) static MoveToAction
moveToAligned
(float x, float y, int alignment, float duration, Interpolation interpolation) static ParallelAction
parallel()
static ParallelAction
static ParallelAction
static ParallelAction
static ParallelAction
static ParallelAction
static ParallelAction
static RemoveAction
removeAction
(Action action) static RemoveAction
removeAction
(Action action, Actor targetActor) static RemoveActorAction
static RemoveActorAction
removeActor
(Actor removeActor) static RemoveListenerAction
removeListener
(EventListener listener, boolean capture) static RemoveListenerAction
removeListener
(EventListener listener, boolean capture, Actor targetActor) static RepeatAction
static RotateByAction
rotateBy
(float rotationAmount) Rotates the actor instantly.static RotateByAction
rotateBy
(float rotationAmount, float duration) static RotateByAction
rotateBy
(float rotationAmount, float duration, Interpolation interpolation) static RotateToAction
rotateTo
(float rotation) Rotates the actor instantly.static RotateToAction
rotateTo
(float rotation, float duration) static RotateToAction
rotateTo
(float rotation, float duration, Interpolation interpolation) static RunnableAction
static ScaleByAction
scaleBy
(float amountX, float amountY) Scales the actor instantly.static ScaleByAction
scaleBy
(float amountX, float amountY, float duration) static ScaleByAction
scaleBy
(float amountX, float amountY, float duration, Interpolation interpolation) static ScaleToAction
scaleTo
(float x, float y) Scales the actor instantly.static ScaleToAction
scaleTo
(float x, float y, float duration) static ScaleToAction
scaleTo
(float x, float y, float duration, Interpolation interpolation) static SequenceAction
sequence()
static SequenceAction
static SequenceAction
static SequenceAction
static SequenceAction
static SequenceAction
static SequenceAction
static VisibleAction
show()
static SizeByAction
sizeBy
(float amountX, float amountY) Sizes the actor instantly.static SizeByAction
sizeBy
(float amountX, float amountY, float duration) static SizeByAction
sizeBy
(float amountX, float amountY, float duration, Interpolation interpolation) static SizeToAction
sizeTo
(float x, float y) Sizes the actor instantly.static SizeToAction
sizeTo
(float x, float y, float duration) static SizeToAction
sizeTo
(float x, float y, float duration, Interpolation interpolation) static Action
Sets the target of an action and returns the action.static TimeScaleAction
static TouchableAction
static VisibleAction
visible
(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
-