本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite类的典型用法代码示例。如果您正苦于以下问题:Java GnollTricksterSprite类的具体用法?Java GnollTricksterSprite怎么用?Java GnollTricksterSprite使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GnollTricksterSprite类属于com.shatteredpixel.shatteredpixeldungeon.sprites包,在下文中一共展示了GnollTricksterSprite类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WndSadGhost
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite; //导入依赖的package包/类
public WndSadGhost( final Ghost ghost, final int type ) {
super();
IconTitle titlebar = new IconTitle();
BitmapTextMultiline message;
switch (type){
case 1:default:
titlebar.icon( new FetidRatSprite() );
titlebar.label( "DEFEATED FETID RAT" );
message = PixelScene.createMultiline( TXT_RAT+TXT_GIVEITEM, 6 );
break;
case 2:
titlebar.icon( new GnollTricksterSprite() );
titlebar.label( "DEFEATED GNOLL TRICKSTER" );
message = PixelScene.createMultiline( TXT_GNOLL+TXT_GIVEITEM, 6 );
break;
case 3:
titlebar.icon( new GreatCrabSprite());
titlebar.label( "DEFEATED GREAT CRAB" );
message = PixelScene.createMultiline( TXT_CRAB+TXT_GIVEITEM, 6 );
break;
}
titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar );
message.maxWidth = WIDTH;
message.measure();
message.y = titlebar.bottom() + GAP;
add( message );
RedButton btnWeapon = new RedButton( TXT_WEAPON ) {
@Override
protected void onClick() {
selectReward( ghost, Ghost.Quest.weapon );
}
};
btnWeapon.setRect( 0, message.y + message.height() + GAP, WIDTH, BTN_HEIGHT );
add( btnWeapon );
if (!Dungeon.isChallenged( Challenges.NO_ARMOR )) {
RedButton btnArmor = new RedButton(TXT_ARMOR) {
@Override
protected void onClick() {
selectReward(ghost, Ghost.Quest.armor);
}
};
btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnArmor);
resize(WIDTH, (int) btnArmor.bottom());
} else {
resize(WIDTH, (int) btnWeapon.bottom());
}
}
示例2: WndSadGhost
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite; //导入依赖的package包/类
public WndSadGhost( final Ghost ghost, final int type ) {
super();
IconTitle titlebar = new IconTitle();
RenderedTextMultiline message;
switch (type){
case 1:default:
titlebar.icon( new FetidRatSprite() );
titlebar.label( Messages.get(this, "rat_title") );
message = PixelScene.renderMultiline( Messages.get(this, "rat")+Messages.get(this, "give_item"), 6 );
break;
case 2:
titlebar.icon( new GnollTricksterSprite() );
titlebar.label( Messages.get(this, "gnoll_title") );
message = PixelScene.renderMultiline( Messages.get(this, "gnoll")+Messages.get(this, "give_item"), 6 );
break;
case 3:
titlebar.icon( new GreatCrabSprite());
titlebar.label( Messages.get(this, "crab_title") );
message = PixelScene.renderMultiline( Messages.get(this, "crab")+Messages.get(this, "give_item"), 6 );
break;
}
titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar );
message.maxWidth(WIDTH);
message.setPos(0, titlebar.bottom() + GAP);
add( message );
RedButton btnWeapon = new RedButton( Messages.get(this, "weapon") ) {
@Override
protected void onClick() {
selectReward( ghost, Ghost.Quest.weapon );
}
};
btnWeapon.setRect( 0, message.top() + message.height() + GAP, WIDTH, BTN_HEIGHT );
add( btnWeapon );
if (!Dungeon.isChallenged( Challenges.NO_ARMOR )) {
RedButton btnArmor = new RedButton( Messages.get(this, "armor") ) {
@Override
protected void onClick() {
selectReward(ghost, Ghost.Quest.armor);
}
};
btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnArmor);
resize(WIDTH, (int) btnArmor.bottom());
} else {
resize(WIDTH, (int) btnWeapon.bottom());
}
}