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


Java SystemTime类代码示例

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


SystemTime类属于com.watabou.utils包,在下文中一共展示了SystemTime类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = SystemClock.elapsedRealtime();
	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:G2159687,项目名称:ESPD,代码行数:21,代码来源:Game.java

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: onDrawFrame

import com.watabou.utils.SystemTime; //导入依赖的package包/类
@Override
public void onDrawFrame( GL10 gl ) {
	
	if (width == 0 || height == 0) {
		return;
	}
	
	SystemTime.tick();
	long rightNow = SystemClock.elapsedRealtime();
	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:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:21,代码来源:Game.java

示例7: onResume

import com.watabou.utils.SystemTime; //导入依赖的package包/类
@Override
public void onResume() {
	super.onResume();

	now = 0;

	SystemTime.tick();
	SystemTime.updateLastActionTime();

	view.onResume();

	Music.INSTANCE.resume();
	Sample.INSTANCE.resume();

	if (doOnResume != null) {
		doOnResume.run();
		doOnResume = null;
	}
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:20,代码来源:Game.java

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: init

import com.watabou.utils.SystemTime; //导入依赖的package包/类
public static void init() {
	gameId = String.valueOf(SystemTime.now());

	challenges = PixelDungeon.challenges();

	Scroll.initLabels();
	Potion.initColors();
	Wand.initWoods();
	Ring.initGems();

	Statistics.reset();
	Journal.reset();

	depth = 0;
	gold(0);

	potionOfStrength = 0;
	scrollsOfUpgrade = 0;
	arcaneStyli = 0;
	dewVial = true;
	transmutation = Random.IntRange(6, 14);

	chapters = new HashSet<>();

	Ghost.Quest.reset();
	WandMaker.Quest.reset();
	Blacksmith.Quest.reset();
	Imp.Quest.reset();
	ScarecrowNPC.Quest.reset();
	AzuterronNPC.Quest.reset();
	CagedKobold.Quest.reset();
	PlagueDoctorNPC.Quest.reset();

	Room.shuffleTypes();

	hero = new Hero(difficulty);

	Badges.reset();

	heroClass.initHero(hero);

	hero.levelId = DungeonGenerator.getEntryLevel();

	SaveUtils.deleteLevels(heroClass);
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:46,代码来源:Dungeon.java


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