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


Java PotionOfInvisibility类代码示例

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


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

示例1: add

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; //导入依赖的package包/类
public void add( State state ) {
	switch (state) {
	case BURNING:
		burning = emitter();
		burning.pour( FlameParticle.FACTORY, 0.06f );
		if (visible) {
			Sample.INSTANCE.play( Assets.SND_BURNING );
		}
		break;
	case LEVITATING:
		levitation = emitter();
		levitation.pour( Speck.factory( Speck.JET ), 0.02f );
		break;
	case INVISIBLE:
		PotionOfInvisibility.melt( ch );
		break;
	case PARALYSED:
		paused = true;
		break;
	case FROZEN:
		iceBlock = IceBlock.freeze( this );
		paused = true;
		break;
	case ILLUMINATED:
		GameScene.effect( halo = new TorchHalo( this ) );
		break;
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:29,代码来源:CharSprite.java

示例2: paint

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; //导入依赖的package包/类
public static void paint( Level level, Room room ) {
	
	fill( level, room, Terrain.WALL );
	fill( level, room, 1, Terrain.WATER );
	
	Room.Door door = room.entrance(); 
	door.set( Room.Door.Type.REGULAR );

	int x = -1;
	int y = -1;
	if (door.x == room.left) {
		
		x = room.right - 1;
		y = room.top + room.height() / 2;
		
	} else if (door.x == room.right) {
		
		x = room.left + 1;
		y = room.top + room.height() / 2;
		
	} else if (door.y == room.top) {
		
		x = room.left + room.width() / 2;
		y = room.bottom - 1;
		
	} else if (door.y == room.bottom) {
		
		x = room.left + room.width() / 2;
		y = room.top + 1;
		
	}
	
	int pos = x + y * Level.WIDTH;
	level.drop( prize( level ), pos ).type = 
		Random.Int( 3 ) == 0 ? Heap.Type.CHEST : Heap.Type.HEAP;
	set( level, pos, Terrain.PEDESTAL );
	
	level.addItemToSpawn( new PotionOfInvisibility() );
	
	for (int i=0; i < NPIRANHAS; i++) {
		Piranha piranha = new Piranha();
		do {
			piranha.pos = room.random();
		} while (level.map[piranha.pos] != Terrain.WATER|| Actor.findChar( piranha.pos ) != null);
		level.mobs.add( piranha );
		Actor.occupyCell( piranha );
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:49,代码来源:PoolPainter.java

示例3: paint

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; //导入依赖的package包/类
public void paint( Level level ) {
	
	Painter.fill( level, this, Terrain.WALL );
	Painter.fill( level, this, 1, Terrain.WATER );
	
	Door door = entrance();
	door.set( Door.Type.REGULAR );

	int x = -1;
	int y = -1;
	if (door.x == left) {
		
		x = right - 1;
		y = top + height() / 2;
		
	} else if (door.x == right) {
		
		x = left + 1;
		y = top + height() / 2;
		
	} else if (door.y == top) {
		
		x = left + width() / 2;
		y = bottom - 1;
		
	} else if (door.y == bottom) {
		
		x = left + width() / 2;
		y = top + 1;
		
	}
	
	int pos = x + y * level.width();
	level.drop( prize( level ), pos ).type =
		Random.Int( 3 ) == 0 ? Heap.Type.CHEST : Heap.Type.HEAP;
	Painter.set( level, pos, Terrain.PEDESTAL );
	
	level.addItemToSpawn( new PotionOfInvisibility() );
	
	for (int i=0; i < NPIRANHAS; i++) {
		Piranha piranha = new Piranha();
		do {
			piranha.pos = level.pointToCell(random());
		} while (level.map[piranha.pos] != Terrain.WATER|| level.findMob( piranha.pos ) != null);
		level.mobs.add( piranha );
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:48,代码来源:PoolRoom.java

示例4: imbuePotion

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; //导入依赖的package包/类
public Item imbuePotion(Potion potion){

		potionAttrib = potion;
		potionAttrib.ownedByFruit = true;

		potionAttrib.image = ItemSpriteSheet.BLANDFRUIT;

		if (potionAttrib instanceof PotionOfHealing){
			name = Messages.get(this, "sunfruit");
			potionGlow = new ItemSprite.Glowing( 0x2EE62E );
		} else if (potionAttrib instanceof PotionOfStrength){
			name = Messages.get(this, "rotfruit");
			potionGlow = new ItemSprite.Glowing( 0xCC0022 );
		} else if (potionAttrib instanceof PotionOfParalyticGas){
			name = Messages.get(this, "earthfruit");
			potionGlow = new ItemSprite.Glowing( 0x67583D );
		} else if (potionAttrib instanceof PotionOfInvisibility){
			name = Messages.get(this, "blindfruit");
			potionGlow = new ItemSprite.Glowing( 0xE5D273 );
		} else if (potionAttrib instanceof PotionOfLiquidFlame){
			name = Messages.get(this, "firefruit");
			potionGlow = new ItemSprite.Glowing( 0xFF7F00 );
		} else if (potionAttrib instanceof PotionOfFrost){
			name = Messages.get(this, "icefruit");
			potionGlow = new ItemSprite.Glowing( 0x66B3FF );
		} else if (potionAttrib instanceof PotionOfMindVision){
			name = Messages.get(this, "fadefruit");
			potionGlow = new ItemSprite.Glowing( 0xB8E6CF );
		} else if (potionAttrib instanceof PotionOfToxicGas){
			name = Messages.get(this, "sorrowfruit");
			potionGlow = new ItemSprite.Glowing( 0xA15CE5 );
		} else if (potionAttrib instanceof PotionOfLevitation) {
			name = Messages.get(this, "stormfruit");
			potionGlow = new ItemSprite.Glowing( 0x1C3A57 );
		} else if (potionAttrib instanceof PotionOfPurity) {
			name = Messages.get(this, "dreamfruit");
			potionGlow = new ItemSprite.Glowing( 0x8E2975 );
		} else if (potionAttrib instanceof PotionOfExperience) {
			name = Messages.get(this, "starfruit");
			potionGlow = new ItemSprite.Glowing( 0xA79400 );
		}

		return this;
	}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:45,代码来源:Blandfruit.java


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