List of usage examples for com.badlogic.gdx.scenes.scene2d.actions MoveByAction MoveByAction
MoveByAction
From source file:com.bagon.matchteam.mtx.scene2d.AbstractActorLight.java
License:Apache License
public void actionMoveBy(float x, float y, float duration) { // Move towards a direction during given time (NON-STOP) MoveByAction action = new MoveByAction(); action.setAmount(x, y);//from w w w . j av a 2 s . c o m if (duration > 0) { action.setDuration(duration); } addAction(action); }
From source file:com.mk.apps.superm.mtx.AbstractActor.java
License:Apache License
public void actionMoveBy(float x, float y, float duration) { // Move towards a direction during given time (NON-STOP) MoveByAction action = new MoveByAction(); action.setAmount(x, y);/* w w w. j av a2s.c o m*/ if (duration > 0.0f) { action.setDuration(duration); } addAction(action); }
From source file:com.sawan.mathattack.scene2d.AbstractActorLight.java
License:Open Source License
/** * Action move by./*from www . j av a 2 s .com*/ * * @param x the x * @param y the y * @param duration the duration */ public void actionMoveBy(float x, float y, float duration) { // Move towards a direction during given time (NON-STOP) MoveByAction action = new MoveByAction(); action.setAmount(x, y); if (duration > 0) { action.setDuration(duration); } addAction(action); }
From source file:sink.map.MapActor.java
License:Apache License
public void moveBy(float x, float y, float duration) { // Move towards a direction during given time (NON-STOP) MoveByAction move = new MoveByAction(); move.setAmount(x, y);/*from www . jav a 2 s.c om*/ if (duration > 0.0f) { move.setDuration(duration); } Action over = new Action() { @Override public boolean act(final float it) { setPosition(this.getActor().getX(), this.getActor().getY()); fireMovedEvent(); return true; } }; addAction(Actions.sequence(move, over)); }