本文整理匯總了Java中com.badlogic.gdx.utils.Timer.start方法的典型用法代碼示例。如果您正苦於以下問題:Java Timer.start方法的具體用法?Java Timer.start怎麽用?Java Timer.start使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.utils.Timer
的用法示例。
在下文中一共展示了Timer.start方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: VindicetisExSimius
import com.badlogic.gdx.utils.Timer; //導入方法依賴的package包/類
public VindicetisExSimius(final TriviazoGame game) {
super(game);
game.getMusicManager().play(TriviazoMusic.TENSION_IS_RISING);
timer = new Timer();
timer.scheduleTask(task, 0F, intervalSeconds);
timer.start();
}
示例2: TempusFugit
import com.badlogic.gdx.utils.Timer; //導入方法依賴的package包/類
public TempusFugit(final TriviazoGame game) {
super(game);
game.getMusicManager().play(TriviazoMusic.TENSION_IS_RISING);
timer = new Timer();
timer.scheduleTask(task, delaySeconds, intervalSeconds);
timer.start();
}
示例3: GameStage
import com.badlogic.gdx.utils.Timer; //導入方法依賴的package包/類
/**
* Constructor for GameStage.
* @param width width of the game stage viewport in pixels
* @param height height of the game stage viewport in pixels
* @param levelWidth game world/level width
*/
public GameStage(float width, float height, float levelWidth) {
super(width, height, false);
world = new World(new Vector2(0.0f, -9.8f), true);
/* TODO It seems that there is some strange static data inside the
* world which doesn't get cleared even after this stage and world
* declared here are disposed. This seems to cause strange
* (gravitational?) forces when new world is created and disposed
* few times.
*
* This could be also a result of varying fps during start up. */
world.setWarmStarting(true);
itemDestructor = new ItemDestructionList();
this.levelWidth = levelWidth;
/* Timer is used to implement a short delay between start of
* physics modeling and damage modeling to allow bodies hit the ground
* without any damage. */
Timer.Task timTsk = new SetModelContactListener();
Timer tim = new Timer();
tim.scheduleTask(timTsk, 3.0f); /* sec */
tim.start();
if (G.DEBUG) {
renderer = new Box2DDebugRenderer(true, true, true, true, true);
debugCamera = new OrthographicCamera(
this.getWidth() * G.WORLD_TO_BOX,
this.getHeight() * G.WORLD_TO_BOX);
renderer.setDrawAABBs(false);
renderer.setDrawJoints(true);
renderer.setDrawVelocities(true);
renderer.setDrawBodies(true);
Vector3 pos = this.getCamera().position;
debugCamera.position.set(pos.x*G.WORLD_TO_BOX, pos.y*G.WORLD_TO_BOX, 0);
debugCamera.update();
}
}
示例4: start
import com.badlogic.gdx.utils.Timer; //導入方法依賴的package包/類
public void start() {
timeTimer = new Timer();
timeTimer.start();
timeTimer.scheduleTask(timeTask, time / 1000f);
this.timeToFinish = timeTask.getExecuteTimeMillis() - System.nanoTime() / 1000000;
}