Advertisement
Masadow

Procedural cachedGraphic

Dec 20th, 2013
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.42 KB | None | 0 0
  1.     public static function initGraphic()
  2.     {
  3.         //Prepare graphic
  4.         var graphic : CachedGraphics = FlxG.bitmap.create(16, 16, 0x0, true, "circle");
  5.         FlxSpriteUtil.flashGfx.clear();
  6.         FlxSpriteUtil.flashGfx.beginFill(0xFFFFFFFF);
  7.         FlxSpriteUtil.flashGfx.lineStyle(2, 0xFFFFFF, 0.5);
  8.         FlxSpriteUtil.flashGfx.drawCircle(8, 8, 8);
  9.         FlxSpriteUtil.flashGfx.endFill();
  10.         graphic.bitmap.draw(FlxSpriteUtil.flashGfxSprite);
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement