本文整理汇总了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));
}