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

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

java 1次浏览

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

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

示例1: placeShopkeeper

点赞 3

import com.watabou.pixeldungeon.levels.LastShopLevel; //导入依赖的package包/类
private static void placeShopkeeper( Level level, Room room ) {
	
	int pos;
	do {
		pos = room.random();
	} while (level.heaps.get( pos ) != null);
	
	Mob shopkeeper = level instanceof LastShopLevel ? new ImpShopkeeper() : new Shopkeeper();
	shopkeeper.pos = pos;
	level.mobs.add( shopkeeper );
	
	if (level instanceof LastShopLevel) {
		for (int i=0; i < Level.NEIGHBOURS9.length; i++) {
			int p = shopkeeper.pos + Level.NEIGHBOURS9[i];
			if (level.map[p] == Terrain.EMPTY_SP) {
				level.map[p] = Terrain.WATER;
			}
		}
	}
}
 

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

示例2: placeShopkeeper

点赞 3

import com.watabou.pixeldungeon.levels.LastShopLevel; //导入依赖的package包/类
private static void placeShopkeeper( Level level, Room room ) {
	
	int pos;
	do {
		pos = room.random(level);
	} while (level.getHeap( pos ) != null);


	Mob shopkeeper = level instanceof LastShopLevel ? new ImpShopkeeper() : new Shopkeeper();
	if (Dungeon.depth == 27) {
		shopkeeper = new AzuterronNPC();
	}
	shopkeeper.setPos(pos);
	level.mobs.add( shopkeeper );
	
	if (level instanceof LastShopLevel) {
		for (int i=0; i < Level.NEIGHBOURS9.length; i++) {
			int p = shopkeeper.getPos() + Level.NEIGHBOURS9[i];
			if (level.map[p] == Terrain.EMPTY_SP) {
				level.map[p] = Terrain.WATER;
			}
		}
	}
}
 

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

示例3: initLevelsMap

点赞 2

import com.watabou.pixeldungeon.levels.LastShopLevel; //导入依赖的package包/类
private static void initLevelsMap() {
	if (BuildConfig.DEBUG) {
		mDungeonMap = JsonHelper.readJsonFromAsset("levelsDesc/Dungeon_debug.json");
	} else {
		mDungeonMap = JsonHelper.readJsonFromAsset("levelsDesc/Dungeon.json");
	}

	try {
		mLevels = mDungeonMap.getJSONObject("Levels");
		mGraph = mDungeonMap.getJSONObject("Graph");
	} catch (JSONException e) {
		throw new TrackedRuntimeException(e);
	}

	mLevelKindList = new HashMap<>();

	registerLevelClass(SewerLevel.class);
	registerLevelClass(SewerBossLevel.class);
	registerLevelClass(SpiderLevel.class);
	registerLevelClass(PrisonLevel.class);
	registerLevelClass(PrisonBossLevel.class);
	registerLevelClass(CavesLevel.class);
	registerLevelClass(CavesBossLevel.class);
	registerLevelClass(CityLevel.class);
	registerLevelClass(CityBossLevel.class);
	registerLevelClass(LastShopLevel.class);
	registerLevelClass(HallsLevel.class);
	registerLevelClass(HallsBossLevel.class);
	registerLevelClass(LastLevel.class);
	registerLevelClass(DeadEndLevel.class);

	registerLevelClass(PredesignedLevel.class);
	registerLevelClass(GutsLevel.class);
	registerLevelClass(ShadowLordLevel.class);
	registerLevelClass(FakeLastLevel.class);

	registerLevelClass(NecroLevel.class);
	registerLevelClass(NecroBossLevel.class);

	registerLevelClass(IceCavesLevel.class);
	registerLevelClass(IceCavesBossLevel.class);
	registerLevelClass(RandomLevel.class);
	registerLevelClass(TownShopLevel.class);

}
 

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


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