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


Java SystemTime.now方法代码示例

本文整理汇总了Java中com.watabou.utils.SystemTime.now方法的典型用法代码示例。如果您正苦于以下问题:Java SystemTime.now方法的具体用法?Java SystemTime.now怎么用?Java SystemTime.now使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.watabou.utils.SystemTime的用法示例。


在下文中一共展示了SystemTime.now方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDrawFrame

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void onDrawFrame( GL10 gl ) {
	
	if (width == 0 || height == 0) {
		return;
	}
	
	SystemTime.tick();
	long rightNow = SystemTime.now;
	step = (now == 0 ? 0 : rightNow - now);
	now = rightNow;
	
	step();

	NoosaScript.get().resetCamera();
	NoosaScriptNoLighting.get().resetCamera();
	GLES20.glDisable( GLES20.GL_SCISSOR_TEST );
	GLES20.glClear( GLES20.GL_COLOR_BUFFER_BIT );
	draw();
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:21,代码来源:Game.java

示例2: render

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void render() {
	
	if (width == 0 || height == 0) {
		return;
	}
	
	SystemTime.tick();
	long rightNow = SystemTime.now;
	step = (now == 0 ? 0 : rightNow - now);
	now = rightNow;
	
	step();

	NoosaScript.get().resetCamera();
	Gdx.gl.glScissor( 0, 0, width, height );
	Gdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );
	draw();
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:20,代码来源:Game.java

示例3: onDrawFrame

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void onDrawFrame( GL10 gl ) {
	
	if (width == 0 || height == 0) {
		return;
	}
	
	SystemTime.tick();
	long rightNow = SystemTime.now;
	step = (now == 0 ? 0 : rightNow - now);
	now = rightNow;
	
	step();

	NoosaScript.get().resetCamera();
	GLES20.glScissor( 0, 0, width, height );
	GLES20.glClear( GLES20.GL_COLOR_BUFFER_BIT );
	draw();
}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:20,代码来源:Game.java

示例4: render

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void render() {
    if (width == 0 || height == 0) {
        return;
    }

    SystemTime.tick();
    long rightNow = SystemTime.now;
    step = (now == 0 ? 0 : rightNow - now);
    now = rightNow;

    step();

    NoosaScript.get().resetCamera();
    Gdx.gl.glScissor(0, 0, width, height);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    draw();
}
 
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:19,代码来源:Game.java

示例5: onDrawFrame

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void onDrawFrame(GL10 gl) {
	if (instance() == null || width() == 0 || height() == 0) {
		return;
	}

	if(paused) {
		GLES20.glScissor(0, 0, width(), height());
		GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
		return;
	}

	SystemTime.tick();
	long rightNow = SystemTime.now();
	step = (now == 0 ? 0 : rightNow - now);
	now = rightNow;

	step();

	NoosaScript.get().resetCamera();
	GLES20.glScissor(0, 0, width(), height());
	GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
	
	draw();
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:26,代码来源:Game.java

示例6: saveAll

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
public synchronized static void saveAll() {

		if (SystemTime.now() - lastSaveTimestamp < 250) {
			GLog.i("Saving too fast...");
			return;
		}

		GLog.i("save time: %d", SystemTime.now());
		lastSaveTimestamp = SystemTime.now();

		FutureTask<Void> saveTask = new FutureTask<>(new Runnable() {
			@Override
			public void run() {
				saveAllImpl();
			}
		}, null);

		Game.instance().executor.execute(saveTask);

		try {
			saveTask.get();
		} catch (Exception e) {
			throw new TrackedRuntimeException(e);
		}
	}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:26,代码来源:Dungeon.java

示例7: render

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void render() {
	
	if (width == 0 || height == 0) {
		return;
	}

	SystemTime.tick();
	long rightNow = SystemTime.now;
	step = (now == 0 ? 0 : rightNow - now);
	now = rightNow;

	step();

	NoosaScript.get().resetCamera();
	NoosaScriptNoLighting.get().resetCamera();
	Gdx.gl.glDisable( GL20.GL_SCISSOR_TEST );
	Gdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );
	draw();
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon-gdx,代码行数:21,代码来源:Game.java

示例8: timeout

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
protected boolean timeout() {
	//GLog.i("timeout: %d %d", SystemTime.now(),lastActionTime);
	if (SystemTime.now() - SystemTime.getLastActionTime() > PixelDungeon.getMoveTimeout()) {
		SystemTime.updateLastActionTime();
		spend(TIME_TO_REST);
		return true;
	}
	return false;
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:11,代码来源:Hero.java

示例9: update

import com.watabou.utils.SystemTime; //导入方法依赖的package包/类
@Override
public void update() {
	super.update();
	if(SystemTime.now() - lastUpdatedTime > 1000) {
		lastUpdatedTime = SystemTime.now();
		updateStatus();
	}
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:9,代码来源:PlayGamesButton.java


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