本文整理匯總了Java中com.badlogic.gdx.scenes.scene2d.actions.Actions.run方法的典型用法代碼示例。如果您正苦於以下問題:Java Actions.run方法的具體用法?Java Actions.run怎麽用?Java Actions.run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.scenes.scene2d.actions.Actions
的用法示例。
在下文中一共展示了Actions.run方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: actionShowCompletedDialog
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //導入方法依賴的package包/類
private Action actionShowCompletedDialog() {
return Actions.run(new Runnable() {
@Override
public void run() {
endSessionCleanup();
showFinalStats();
}
});
}
示例2: actionSaveActiveDeck
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //導入方法依賴的package包/類
private Action actionSaveActiveDeck(final Button howa) {
return Actions.run(new Runnable() {
@Override
public void run() {
saveActiveDeck();
howa.setDisabled(false);
}
});
}
示例3: actionFirstTime
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //導入方法依賴的package包/類
private Action actionFirstTime() {
return Actions.run(new Runnable() {
@Override
public void run() {
firstTime();
}
});
}
示例4: resizeBalls
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //導入方法依賴的package包/類
/**
* Resize some balls from this board.
*
* @param bounds bounding box for the balls that will be resized.
* @param scale the final scale for these balls.
* @param time the time that the animation will last for
* @return the action that will animate these balls
*/
private Action resizeBalls(final Bounds bounds, final float scale, final float time) {
Action scalingAction = Actions.run(new Runnable() {
@Override
public void run() {
for (int x = bounds.minX; x <= bounds.maxX; x++) {
for (int y = bounds.minY; y <= bounds.maxY; y++) {
BallActor scaledBall = actors[x][y];
scaledBall.addAction(Actions.scaleTo(scale, scale, time));
}
}
}
});
return Actions.sequence(scalingAction, Actions.delay(time));
}
示例5: shake
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //導入方法依賴的package包/類
public Action shake(final Bounds region, final float shakiness, final int times, final float speed) {
Action shakingAction = Actions.run(new Runnable() {
@Override
public void run() {
for (int y = region.minY; y <= region.maxY; y++)
for (int x = region.minX; x <= region.maxX; x++)
actors[x][y].addAction(Actions.repeat(times, Actions.sequence(
Actions.moveBy(shakiness / 2, 0, speed / 2),
Actions.moveBy(-shakiness, 0, speed),
Actions.moveBy(shakiness / 2, 0, speed / 2)
)));
}
});
return Actions.sequence(shakingAction, Actions.delay(times * speed));
}