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