本文整理汇总了Java中com.watabou.noosa.Image.frame方法的典型用法代码示例。如果您正苦于以下问题:Java Image.frame方法的具体用法?Java Image.frame怎么用?Java Image.frame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.watabou.noosa.Image
的用法示例。
在下文中一共展示了Image.frame方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: layout
import com.watabou.noosa.Image; //导入方法依赖的package包/类
@Override
protected void layout() {
bg.x = x;
bg.y = y;
Integer iconInt;
if (item instanceof Scroll) {
iconInt = ((Scroll) item).initials();
} else if (item instanceof Potion) {
iconInt = ((Potion) item).initials();
} else {
iconInt = null;
}
if (iconInt != null && iconVisible) {
bottomRightIcon = new Image(Assets.CONS_ICONS);
int left = iconInt * 7;
int top = item instanceof Potion ? 0 : 8;
bottomRightIcon.frame(left, top, 7, 8);
add(bottomRightIcon);
}
super.layout();
}
示例2: WndInfoBuff
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public WndInfoBuff(Buff buff) {
super();
IconTitle titlebar = new IconTitle();
icons = TextureCache.get(Assets.BUFFS_LARGE);
film = new TextureFilm(icons, 16, 16);
Image buffIcon = new Image(icons);
buffIcon.frame(film.get(buff.icon()));
titlebar.icon(buffIcon);
titlebar.label(Messages.titleCase(buff.toString()), Window.TITLE_COLOR);
titlebar.setRect(0, 0, WIDTH, 0);
add(titlebar);
RenderedTextMultiline txtInfo = PixelScene.renderMultiline(buff.desc(), 6);
txtInfo.maxWidth(WIDTH);
txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP);
add(txtInfo);
resize(WIDTH, (int) (txtInfo.top() + txtInfo.height()));
}
示例3: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get(Type type) {
Image icon = new Image(Assets.BANNERS);
switch (type) {
case PIXEL_DUNGEON:
icon.frame(icon.texture.uvRect(0, 0, 128, 70));
break;
case BOSS_SLAIN:
icon.frame(icon.texture.uvRect(0, 70, 128, 105));
break;
case GAME_OVER:
icon.frame(icon.texture.uvRect(0, 105, 128, 140));
break;
case SELECT_YOUR_HERO:
icon.frame(icon.texture.uvRect(0, 140, 128, 161));
break;
case PIXEL_DUNGEON_SIGNS:
icon.frame(icon.texture.uvRect(0, 161, 128, 218));
break;
case CLEARED:
icon.frame(icon.texture.uvRect(0, 230, 128, 250));
break;
}
return icon;
}
示例4: WndInfoBuff
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public WndInfoBuff(Buff buff){
super();
IconTitle titlebar = new IconTitle();
icons = TextureCache.get( Assets.BUFFS_LARGE );
film = new TextureFilm( icons, 16, 16 );
Image buffIcon = new Image( icons );
buffIcon.frame( film.get(buff.icon()) );
titlebar.icon( buffIcon );
titlebar.label( Messages.titleCase(buff.toString()), Window.TITLE_COLOR );
titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar );
RenderedTextMultiline txtInfo = PixelScene.renderMultiline(buff.desc(), 6);
txtInfo.maxWidth(WIDTH);
txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP);
add( txtInfo );
resize( WIDTH, (int)(txtInfo.top() + txtInfo.height()) );
}
示例5: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.BANNERS );
switch (type) {
case PIXEL_DUNGEON:
icon.frame( icon.texture.uvRect( 0, 0, 132, 90 ) );
break;
case BOSS_SLAIN:
icon.frame( icon.texture.uvRect( 0, 90, 128, 125 ) );
break;
case GAME_OVER:
icon.frame( icon.texture.uvRect( 0, 125, 128, 160 ) );
break;
case SELECT_YOUR_HERO:
icon.frame( icon.texture.uvRect( 0, 160, 128, 181 ) );
break;
case PIXEL_DUNGEON_SIGNS:
icon.frame( icon.texture.uvRect( 133, 0, 255, 90 ) );
break;
}
return icon;
}
示例6: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.EFFECTS );
switch (type) {
case RIPPLE:
icon.frame( icon.texture.uvRect( 0, 0, 16, 16 ) );
break;
case LIGHTNING:
icon.frame( icon.texture.uvRect( 16, 0, 32, 8 ) );
break;
case WOUND:
icon.frame( icon.texture.uvRect( 16, 8, 32, 16 ) );
break;
case RAY:
icon.frame( icon.texture.uvRect( 16, 16, 32, 24 ) );
break;
}
return icon;
}
示例7: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.BANNERS );
switch (type) {
case PIXEL_DUNGEON:
icon.frame( icon.texture.uvRect( 0, 0, 128, 70 ) );
break;
case BOSS_SLAIN:
icon.frame( icon.texture.uvRect( 0, 70, 128, 105 ) );
break;
case GAME_OVER:
icon.frame( icon.texture.uvRect( 0, 105, 128, 140 ) );
break;
case SELECT_YOUR_HERO:
icon.frame( icon.texture.uvRect( 0, 140, 128, 161 ) );
break;
case PIXEL_DUNGEON_SIGNS:
icon.frame( icon.texture.uvRect( 0, 161, 128, 218 ) );
break;
}
return icon;
}
示例8: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.EFFECTS );
switch (type) {
case RIPPLE:
icon.frame( icon.texture.uvRect( 0, 0, 16, 16 ) );
break;
case CHAIN:
icon.frame( icon.texture.uvRect( 0, 16, 8, 24 ) );
break;
case LIGHTNING:
icon.frame( icon.texture.uvRect( 16, 0, 32, 8 ) );
break;
case WOUND:
icon.frame( icon.texture.uvRect( 16, 8, 32, 16 ) );
break;
case RAY:
icon.frame( icon.texture.uvRect( 16, 16, 32, 24 ) );
break;
case DRAIN:
icon.frame( icon.texture.uvRect( 16, 24, 32, 32 ) );
break;
}
return icon;
}
示例9: WndInfoBuff
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public WndInfoBuff(Buff buff){
super();
IconTitle titlebar = new IconTitle();
icons = TextureCache.get( Assets.BUFFS_LARGE );
film = new TextureFilm( icons, 16, 16 );
Image buffIcon = new Image( icons );
buffIcon.frame( film.get(buff.icon()) );
titlebar.icon( buffIcon );
titlebar.label( Utils.capitalize(buff.toString()), Window.TITLE_COLOR );
titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar );
BitmapTextMultiline txtInfo = PixelScene.createMultiline(buff.desc(), 6);
txtInfo.maxWidth = WIDTH;
txtInfo.measure();
txtInfo.x = titlebar.left();
txtInfo.y = titlebar.bottom() + GAP;
add( txtInfo );
resize( WIDTH, (int)(txtInfo.y + txtInfo.height()) );
}
示例10: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.BANNERS );
switch (type) {
case PIXEL_DUNGEON:
icon.frame( icon.texture.uvRect( 0, 0, 128, 70 ) );
break;
case BOSS_SLAIN:
icon.frame( icon.texture.uvRect( 0, 70, 128, 105 ) );
break;
case GAME_OVER:
icon.frame( icon.texture.uvRect( 0, 105, 128, 140 ) );
break;
case SELECT_YOUR_HERO:
icon.frame( icon.texture.uvRect( 0, 140, 128, 161 ) );
break;
case PIXEL_DUNGEON_SIGNS:
icon.frame( icon.texture.uvRect( 0, 161, 128, 218 ) );
break;
}
return icon;
}
示例11: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get( Type type ) {
Image icon = new Image( Assets.BANNERS );
switch (type) {
case PIXEL_DUNGEON:
icon.frame( icon.texture.uvRect( 0, 0, 128, 70 ) );
break;
case BOSS_SLAIN:
icon.frame( icon.texture.uvRect( 0, 70, 128, 105 ) );
break;
case GAME_OVER:
icon.frame( icon.texture.uvRect( 0, 105, 128, 140 ) );
break;
case SELECT_YOUR_HERO:
icon.frame( icon.texture.uvRect( 0, 140, 128, 161 ) );
break;
}
return icon;
}
示例12: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get(Type type) {
Image icon = new Image(Assets.EFFECTS);
switch (type) {
case RIPPLE:
icon.frame(icon.texture.uvRect(0, 0, 16, 16));
break;
case LIGHTNING:
icon.frame(icon.texture.uvRect(16, 0, 32, 8));
break;
case WOUND:
icon.frame(icon.texture.uvRect(16, 8, 32, 16));
break;
case RAY:
icon.frame(icon.texture.uvRect(16, 16, 32, 24));
break;
}
return icon;
}
示例13: BuffIcon
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public BuffIcon(Buff buff) {
super();
this.buff = buff;
icon = new Image(texture);
icon.frame(film.get(buff.icon()));
add(icon);
}
示例14: get
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public static Image get(Type type) {
Image icon = new Image(Assets.EFFECTS);
switch (type) {
case RIPPLE:
icon.frame(icon.texture.uvRect(0, 0, 16, 16));
break;
case LIGHTNING:
icon.frame(icon.texture.uvRect(16, 0, 32, 8));
break;
case WOUND:
icon.frame(icon.texture.uvRect(16, 8, 32, 16));
break;
case EXCLAMATION:
icon.frame(icon.texture.uvRect(0, 16, 6, 25));
break;
case CHAIN:
icon.frame(icon.texture.uvRect(6, 16, 11, 22));
break;
case DEATH_RAY:
icon.frame(icon.texture.uvRect(16, 16, 32, 24));
break;
case LIGHT_RAY:
icon.frame(icon.texture.uvRect(16, 23, 32, 31));
break;
case HEALTH_RAY:
icon.frame(icon.texture.uvRect(16, 23, 32, 31));
break;
}
return icon;
}
示例15: BuffIcon
import com.watabou.noosa.Image; //导入方法依赖的package包/类
public BuffIcon( Buff buff ){
super();
this.buff = buff;
icon = new Image( texture );
icon.frame( film.get( buff.icon() ) );
add( icon );
}