当前位置: 首页>>代码示例>>Java>>正文


Java Actions.run方法代码示例

本文整理汇总了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();
		}
	});
}
 
开发者ID:CherokeeLanguage,项目名称:cll1-gdx,代码行数:10,代码来源:LearningSession.java

示例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);
		}
	});
}
 
开发者ID:CherokeeLanguage,项目名称:cll1-gdx,代码行数:10,代码来源:LearningSession.java

示例3: actionFirstTime

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
private Action actionFirstTime() {
	return Actions.run(new Runnable() {
		@Override
		public void run() {
			firstTime();
		}
	});
}
 
开发者ID:CherokeeLanguage,项目名称:cll1-gdx,代码行数:9,代码来源:LearningSession.java

示例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));
}
 
开发者ID:danirod,项目名称:rectball,代码行数:23,代码来源:BoardActor.java

示例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));
}
 
开发者ID:danirod,项目名称:rectball,代码行数:16,代码来源:BoardActor.java


注:本文中的com.badlogic.gdx.scenes.scene2d.actions.Actions.run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。