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


Java PotionOfFrost类代码示例

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


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

示例1: onThrow

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; //导入依赖的package包/类
@Override
protected void onThrow(int cell) {
	if (Dungeon.level.map[cell] == Terrain.WELL || Dungeon.level.pit[cell]) {
		super.onThrow( cell );
		
	} else if (potionAttrib instanceof PotionOfLiquidFlame ||
			potionAttrib instanceof PotionOfToxicGas ||
			potionAttrib instanceof PotionOfParalyticGas ||
			potionAttrib instanceof PotionOfFrost ||
			potionAttrib instanceof PotionOfLevitation ||
			potionAttrib instanceof PotionOfPurity) {
		
		Dungeon.level.press( cell, null );
		potionAttrib.shatter( cell );
		
	} else {
		super.onThrow( cell );
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:20,代码来源:Blandfruit.java

示例2: execute

import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; //导入依赖的package包/类
@Override
public void execute( Hero hero, String action ) {

	if (action.equals( AC_EAT ) && potionAttrib == null) {

		GLog.w( Messages.get(this, "raw"));
		return;

	}

	super.execute(hero, action);

	if (action.equals( AC_EAT ) && potionAttrib != null){

		if (potionAttrib instanceof PotionOfFrost) {
			GLog.i(Messages.get(this, "ice_msg"));
			FrozenCarpaccio.effect(hero);
		} else if (potionAttrib instanceof PotionOfLiquidFlame){
			GLog.i(Messages.get(this, "fire_msg"));
			Buff.affect(hero, FireImbue.class).set(FireImbue.DURATION);
		} else if (potionAttrib instanceof PotionOfToxicGas) {
			GLog.i(Messages.get(this, "toxic_msg"));
			Buff.affect(hero, ToxicImbue.class).set(ToxicImbue.DURATION);
		} else if (potionAttrib instanceof PotionOfParalyticGas) {
			GLog.i(Messages.get(this, "para_msg"));
			Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION);
		} else {
			potionAttrib.apply(hero);
		}

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

示例3: imbuePotion

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