本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor类的典型用法代码示例。如果您正苦于以下问题:Java ClassArmor类的具体用法?Java ClassArmor怎么用?Java ClassArmor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClassArmor类属于com.shatteredpixel.shatteredpixeldungeon.items.armor包,在下文中一共展示了ClassArmor类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: upgrade
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; //导入依赖的package包/类
private void upgrade( Armor armor ) {
detach( curUser.belongings.backpack );
curUser.sprite.centerEmitter().start( Speck.factory( Speck.KIT ), 0.05f, 10 );
curUser.spend( TIME_TO_UPGRADE );
curUser.busy();
GLog.w( TXT_UPGRADED, armor.name() );
ClassArmor classArmor = ClassArmor.upgrade( curUser, armor );
if (curUser.belongings.armor == armor) {
curUser.belongings.armor = classArmor;
((HeroSprite)curUser.sprite).updateArmor();
} else {
armor.detach( curUser.belongings.backpack );
classArmor.collect( curUser.belongings.backpack );
}
curUser.sprite.operate( curUser.pos );
Sample.INSTANCE.play( Assets.SND_EVOKE );
}
示例2: upgrade
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; //导入依赖的package包/类
private void upgrade( Armor armor ) {
detach( curUser.belongings.backpack );
curUser.sprite.centerEmitter().start( Speck.factory( Speck.KIT ), 0.05f, 10 );
curUser.spend( TIME_TO_UPGRADE );
curUser.busy();
GLog.w( Messages.get(this, "upgraded", armor.name()) );
ClassArmor classArmor = ClassArmor.upgrade( curUser, armor );
if (curUser.belongings.armor == armor) {
curUser.belongings.armor = classArmor;
((HeroSprite)curUser.sprite).updateArmor();
classArmor.activate(curUser);
} else {
armor.detach( curUser.belongings.backpack );
classArmor.collect( curUser.belongings.backpack );
}
curUser.sprite.operate( curUser.pos );
Sample.INSTANCE.play( Assets.SND_EVOKE );
}