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


Java Timer.start方法代码示例

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

示例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();
}
 
开发者ID:sTorro,项目名称:triviazo,代码行数:8,代码来源:TempusFugit.java

示例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();
    }
}
 
开发者ID:OlliV,项目名称:angr,代码行数:44,代码来源:GameStage.java

示例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;
}
 
开发者ID:delphikettle,项目名称:libgdxGP,代码行数:7,代码来源:TimeTask.java


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