• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RegularLevel类的典型用法和代码示例

java 3次浏览

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

RegularLevel类属于com.watabou.pixeldungeon.levels包,在下文中一共展示了RegularLevel类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: heroFall

点赞 3

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
public static void heroFall( int pos ) {
	
	jumpConfirmed = false;
			
	Sample.INSTANCE.play( Assets.SND_FALLING );
	
	if (Dungeon.hero.isAlive()) {
		Dungeon.hero.interrupt();
		InterlevelScene.mode = InterlevelScene.Mode.FALL;
		if (Dungeon.level instanceof RegularLevel) {
			Room room = ((RegularLevel)Dungeon.level).room( pos );
			InterlevelScene.fallIntoPit = room != null && room.type == Room.Type.WEAK_FLOOR;
		} else {
			InterlevelScene.fallIntoPit = false;
		}
		Game.switchScene( InterlevelScene.class );
	} else {
		Dungeon.hero.sprite.visible = false;
	}
}
 

开发者ID:kurtyu,
项目名称:PixelDungeonTC,
代码行数:21,
代码来源:Chasm.java

示例2: heroFall

点赞 3

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
private static void heroFall(int pos, Hero hero) {

		jumpConfirmed = false;

		Sample.INSTANCE.play( Assets.SND_FALLING );
		hero.releasePets();

		if (hero.isAlive()) {
			hero.clearActions();
			InterlevelScene.mode = InterlevelScene.Mode.FALL;
			if (Dungeon.level instanceof RegularLevel) {
				Room room = ((RegularLevel)Dungeon.level).room( pos );
				InterlevelScene.fallIntoPit = room != null && room.type == Room.Type.WEAK_FLOOR;
			} else {
				InterlevelScene.fallIntoPit = false;
			}
			Game.switchScene( InterlevelScene.class );
		} else {
			hero.getSprite().setVisible(false);
		}
	}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:22,
代码来源:Chasm.java

示例3: spawn

点赞 2

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
public static void spawn(RegularLevel level, Room room) {
	NecromancerNPC npc = new NecromancerNPC();
		int cell;
		do {
			cell = room.random(level);
		} while (level.map[cell] == Terrain.LOCKED_EXIT);
		npc.setPos(cell);
		level.spawnMob(npc);
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:10,
代码来源:NecromancerNPC.java

示例4: spawn

点赞 2

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
public static void spawn( RegularLevel level, Room room ) {
	if (!spawned) {
		CagedKobold npc = new CagedKobold();
		int cell;
		do {
			cell = room.random(level);
		} while (level.map[cell] == Terrain.EXIT);
		npc.setPos(cell);
		level.spawnMob(npc);
		spawned = true;
	}
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:13,
代码来源:CagedKobold.java

示例5: spawn

点赞 2

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
public static void spawn( RegularLevel level ) {
	if (!spawned && Dungeon.depth == 23) {
		Hedgehog hedgehog = new Hedgehog();
		do {
			hedgehog.setPos(level.randomRespawnCell());
		} while (hedgehog.getPos() == -1);
		level.mobs.add( hedgehog );
		Actor.occupyCell( hedgehog );
		
		spawned = true;
	}
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:13,
代码来源:Hedgehog.java

示例6: spawn

点赞 2

import com.watabou.pixeldungeon.levels.RegularLevel; //导入依赖的package包/类
public static void spawn(RegularLevel level) {
	ScarecrowNPC npc = new ScarecrowNPC();
	npc.setPos(level.randomRespawnCell());
	level.spawnMob(npc);
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:6,
代码来源:ScarecrowNPC.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)