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


Java Image.frame方法代码示例

本文整理汇总了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();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:24,代码来源:WndBag.java

示例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()));
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:24,代码来源:WndInfoBuff.java

示例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;
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:25,代码来源:BannerSprites.java

示例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()) );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:24,代码来源:WndInfoBuff.java

示例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;
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:22,代码来源:BannerSprites.java

示例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;
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:19,代码来源:Effects.java

示例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;
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:22,代码来源:BannerSprites.java

示例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;
}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:27,代码来源:Effects.java

示例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()) );
}
 
开发者ID:FthrNature,项目名称:unleashed-pixel-dungeon,代码行数:26,代码来源:WndInfoBuff.java

示例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;
}
 
开发者ID:FthrNature,项目名称:unleashed-pixel-dungeon,代码行数:22,代码来源:BannerSprites.java

示例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;
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:19,代码来源:BannerSprites.java

示例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;
}
 
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:19,代码来源:Effects.java

示例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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:9,代码来源:BuffIndicator.java

示例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;
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:31,代码来源:Effects.java

示例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 );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:9,代码来源:BuffIndicator.java


注:本文中的com.watabou.noosa.Image.frame方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。