當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。