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

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

java 1次浏览

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

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

示例1: add

点赞 2

import com.watabou.pixeldungeon.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:kurtyu,
项目名称:PixelDungeonTC,
代码行数:29,
代码来源:CharSprite.java

示例2: add

点赞 2

import com.watabou.pixeldungeon.items.potions.PotionOfInvisibility; //导入依赖的package包/类
public void add(State state) {
	switch (state) {
		case BURNING:
			burning = emitter();
			burning.pour(FlameParticle.FACTORY, 0.06f);
			if (getVisible()) {
				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:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:29,
代码来源:CharSprite.java

示例3: paint

点赞 2

import com.watabou.pixeldungeon.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:kurtyu,
项目名称:PixelDungeonTC,
代码行数:49,
代码来源:PoolPainter.java

示例4: paint

点赞 2

import com.watabou.pixeldungeon.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.getWidth();
	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.setPos(room.random(level));
		} while (level.map[piranha.getPos()] != Terrain.WATER|| Actor.findChar( piranha.getPos() ) != null);
		level.mobs.add( piranha );
		Actor.occupyCell( piranha );
	}
}
 

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


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