public FogTexture() { super( Bitmap.createBitmap( width2, height2, Bitmap.Config.ARGB_8888 ) ); filter( Texture.LINEAR, Texture.LINEAR ); TextureCache.add( LightMap.class, this ); }
public FogTexture() { super( Bitmap.createBitmap( width2, height2, Bitmap.Config.ARGB_8888 ) ); filter( Texture.LINEAR, Texture.LINEAR ); TextureCache.add( FogOfWar.class, this ); }
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 ); }
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 ); }
public Gradient( int colors[] ) { super( Bitmap.createBitmap( colors.length, 1, Bitmap.Config.ARGB_8888 ) ); for (int i=0; i < colors.length; i++) { bitmap.setPixel( i, 0, colors[i] ); } bitmap( bitmap ); filter( LINEAR, LINEAR ); wrap( CLAMP, CLAMP ); TextureCache.add( Gradient.class, this ); } }
TextureCache.add(FogOfWar.class, tx); texture( tx );
TextureCache.add(FogOfWar.class, tx); texture( tx );
public Halo() { super(); if (!TextureCache.contains( CACHE_KEY )) { Pixmap pixmap = new Pixmap(RADIUS * 2, RADIUS * 2, Pixmap.Format.RGBA8888); pixmap.setColor( 0xFFFFFF0A ); for (int i = 0; i < 50; i++) { pixmap.fillCircle(RADIUS, RADIUS, (int)(RADIUS * (i+1)/50f)); } TextureCache.add( CACHE_KEY, new SmartTexture( pixmap ) ); } texture( CACHE_KEY ); }