本文整理汇总了Java中com.watabou.gltextures.SmartTexture类的典型用法代码示例。如果您正苦于以下问题:Java SmartTexture类的具体用法?Java SmartTexture怎么用?Java SmartTexture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SmartTexture类属于com.watabou.gltextures包,在下文中一共展示了SmartTexture类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains(CACHE_KEY)) {
Bitmap bmp = Bitmap.createBitmap(RADIUS * 2, RADIUS * 2,
Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmp);
Paint paint = new Paint();
paint.setColor(0xFFFFFFFF);
canvas.drawCircle(RADIUS, RADIUS, RADIUS * 0.75f, paint);
paint.setColor(0x88FFFFFF);
canvas.drawCircle(RADIUS, RADIUS, RADIUS, paint);
TextureCache.add(CACHE_KEY, new SmartTexture(bmp));
}
texture(CACHE_KEY);
}
开发者ID:G2159687,项目名称:ESPD,代码行数:18,代码来源:Halo.java
示例2: TextureFilm
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public TextureFilm(Object tx, int width, int height) {
SmartTexture texture = TextureCache.get(tx);
texWidth = texture.width;
texHeight = texture.height;
float uw = (float) width / texWidth;
float vh = (float) height / texHeight;
int cols = texWidth / width;
int rows = texHeight / height;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
RectF rect = new RectF(j * uw, i * vh, (j + 1) * uw, (i + 1) * vh);
add(i * cols + j, rect);
}
}
}
开发者ID:G2159687,项目名称:ESPD,代码行数:20,代码来源:TextureFilm.java
示例3: Font
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Font( SmartTexture tx, int width, int height, String chars ) {
super( tx );
texture = tx;
int length = chars.length();
float uw = (float)width / tx.width;
float vh = (float)height / tx.height;
float left = 0;
float top = 0;
float bottom = vh;
for (int i=0; i < length; i++) {
RectF rect = new RectF( left, top, left += uw, bottom );
add( chars.charAt( i ), rect );
if (left >= 1) {
left = 0;
top = bottom;
bottom += vh;
}
}
lineHeight = baseLine = height;
}
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:27,代码来源:BitmapText.java
示例4: TextureFilm
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public TextureFilm( Object tx, int width, int height ) {
SmartTexture texture = TextureCache.get( tx );
texWidth = texture.width;
texHeight = texture.height;
float uw = (float)width / texWidth;
float vh = (float)height / texHeight;
int cols = texWidth / width;
int rows = texHeight / height;
for (int i=0; i < rows; i++) {
for (int j=0; j < cols; j++) {
RectF rect = new RectF( j * uw, i * vh, (j+1) * uw, (i+1) * vh );
add( i * cols + j, rect );
}
}
}
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:20,代码来源:TextureFilm.java
示例5: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains( CACHE_KEY )) {
Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 );
Canvas canvas = new Canvas( bmp );
Paint paint = new Paint();
paint.setColor( 0xFFFFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS * 0.75f, paint );
paint.setColor( 0x88FFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS, paint );
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
}
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:17,代码来源:Halo.java
示例6: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains( CACHE_KEY )) {
Pixmap pixmap = new Pixmap(RADIUS * 2, RADIUS * 2, Pixmap.Format.RGBA8888);
pixmap.setColor( 0xFFFFFFFF );
pixmap.fillCircle( RADIUS, RADIUS, (int) (RADIUS * 0.75f));
pixmap.setColor( 0xFFFFFF88 );
pixmap.fillCircle( RADIUS, RADIUS, RADIUS );
GdxTexture bmp = new GdxTexture(pixmap);
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
origin.set( RADIUS );
}
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:18,代码来源:Halo.java
示例7: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains( CACHE_KEY )) {
Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 );
Canvas canvas = new Canvas( bmp );
Paint paint = new Paint();
paint.setColor( 0xFFFFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS * 0.75f, paint );
paint.setColor( 0x88FFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS, paint );
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
origin.set( RADIUS );
}
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:19,代码来源:Halo.java
示例8: TextureFilm
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public TextureFilm(Object tx, int width, int height) {
SmartTexture texture = TextureCache.get(tx);
texWidth = texture.width;
texHeight = texture.height;
float uw = (float) width / texWidth;
float vh = (float) height / texHeight;
int cols = texWidth / width;
int rows = texHeight / height;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
RectF rect = new RectF(j * uw, i * vh, (j + 1) * uw, (i + 1) * vh);
add(i * cols + j, rect);
}
}
}
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:20,代码来源:TextureFilm.java
示例9: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains(CACHE_KEY)) {
Pixmap pixmap = new Pixmap(RADIUS * 2, RADIUS * 2, Pixmap.Format.RGBA8888);
pixmap.setColor(0xFFFFFFFF);
pixmap.fillCircle(RADIUS, RADIUS, (int) (RADIUS * 0.75f));
pixmap.setColor(0xFFFFFF88);
pixmap.fillCircle(RADIUS, RADIUS, RADIUS);
Bitmap bmp = new Bitmap(pixmap);
TextureCache.add(CACHE_KEY, new SmartTexture(bmp));
}
texture(CACHE_KEY);
origin.set(RADIUS);
}
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:18,代码来源:Halo.java
示例10: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
super();
if (!TextureCache.contains( CACHE_KEY )) {
Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 );
Canvas canvas = new Canvas( bmp );
Paint paint = new Paint();
paint.setColor( 0x0AFFFFFF );
for (int i = 0; i < 50; i++) {
canvas.drawCircle(RADIUS, RADIUS, RADIUS * (i+1)/50f, paint);
}
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
}
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:17,代码来源:Halo.java
示例11: Halo
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Halo() {
if (!TextureCache.contains( CACHE_KEY )) {
Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 );
Canvas canvas = new Canvas( bmp );
Paint paint = new Paint();
paint.setColor( 0xFFFFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS * 0.75f, paint );
paint.setColor( 0x88FFFFFF );
canvas.drawCircle( RADIUS, RADIUS, RADIUS, paint );
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
origin.set( RADIUS );
}
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:17,代码来源:Halo.java
示例12: Font
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Font(SmartTexture tx, int width, int height, String chars) {
super(tx);
texture = tx;
autoUppercase = chars.equals(LATIN_UPPER);
int length = chars.length();
float uw = (float) width / tx.width;
float vh = (float) height / tx.height;
float left = 0;
float top = 0;
float bottom = vh;
for (int i = 0; i < length; i++) {
RectF rect = new RectF(left, top, left += uw, bottom);
add(chars.charAt(i), rect);
if (left >= 1) {
left = 0;
top = bottom;
bottom += vh;
}
}
lineHeight = baseLine = height;
}
开发者ID:G2159687,项目名称:ESPD,代码行数:29,代码来源:BitmapText.java
示例13: ShadowBox
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public ShadowBox() {
super( Assets.SHADOW, 1 );
//If this is the first time the texture is generated, set the filtering
if (texture.id == -1)
texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR );
scale.set( SIZE, SIZE );
}
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:10,代码来源:ShadowBox.java
示例14: Font
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Font(SmartTexture tx, int width, int height, String chars)
{
super(tx);
texture = tx;
autoUppercase = chars.equals(LATIN_UPPER);
int length = chars.length();
float uw = (float) width / tx.width;
float vh = (float) height / tx.height;
float left = 0;
float top = 0;
float bottom = vh;
for (int i = 0; i < length; i++)
{
RectF rect = new RectF(left, top, left += uw, bottom);
add(chars.charAt(i), rect);
if (left >= 1)
{
left = 0;
top = bottom;
bottom += vh;
}
}
lineHeight = baseLine = height;
}
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:32,代码来源:BitmapText.java
示例15: tiers
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public static TextureFilm tiers() {
if (tiers == null) {
SmartTexture texture = TextureCache.get( Assets.BRIGAND );
tiers = new TextureFilm( texture, texture.width, FRAME_HEIGHT );
}
return tiers;
}
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:9,代码来源:HeroSprite.java
示例16: Font
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Font( SmartTexture tx, int width, int height, String chars ) {
super( tx );
texture = tx;
autoUppercase = chars.equals( LATIN_UPPER );
int length = chars.length();
float uw = (float)width / tx.width;
float vh = (float)height / tx.height;
float left = 0;
float top = 0;
float bottom = vh;
for (int i=0; i < length; i++) {
RectF rect = new RectF( left, top, left += uw, bottom );
add( chars.charAt( i ), rect );
if (left >= 1) {
left = 0;
top = bottom;
bottom += vh;
}
}
lineHeight = baseLine = height;
}
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:29,代码来源:BitmapText.java
示例17: tiers
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public static TextureFilm tiers() {
if (tiers == null) {
SmartTexture texture = TextureCache.get( Assets.ROGUE );
tiers = new TextureFilm( texture, texture.width, FRAME_HEIGHT );
}
return tiers;
}
开发者ID:FthrNature,项目名称:unleashed-pixel-dungeon,代码行数:9,代码来源:HeroSprite.java
示例18: tiers
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public static TextureFilm tiers() {
if (tiers == null) {
// Sprites for all classes are the same in size
SmartTexture texture = TextureCache.get( Assets.ROGUE );
tiers = new TextureFilm( texture, texture.width, FRAME_HEIGHT );
}
return tiers;
}
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:10,代码来源:HeroSprite.java
示例19: Font
import com.watabou.gltextures.SmartTexture; //导入依赖的package包/类
public Font(SmartTexture tx, int width, int height, String chars) {
super(tx);
texture = tx;
autoUppercase = chars.equals(LATIN_UPPER);
int length = chars.length();
float uw = (float) width / tx.width;
float vh = (float) height / tx.height;
float left = 0;
float top = 0;
float bottom = vh;
for (int i = 0; i < length; i++) {
RectF rect = new RectF(left, top, left += uw, bottom);
add(chars.charAt(i), rect);
if (left >= 1) {
left = 0;
top = bottom;
bottom += vh;
}
}
lineHeight = baseLine = height;
}
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:29,代码来源:BitmapText.java
注:本文中的com.watabou.gltextures.SmartTexture类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论