本文整理汇总了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;
}
}
示例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 );
}
}
示例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 );
}
}
示例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;
}