private function fit() { this.scale.set(Map.scale, Map.scale); this.setSize(width * Map.scale, height * Map.scale); this.centerOffsets(true);}
var newone:Bool = FlxG.bitmap.get(FlxG.bitmap.generateKey(Graphic, Key, Unique)) == null; var graph:FlxGraphic = FlxG.bitmap.add(Graphic, Unique, Key); if(newone){ var aux:BitmapData = new BitmapData(Std.int(graph.bitmap.width * 0.5), Std.int(graph.bitmap.height * 0.5), true, 0x00000000); var mat:Matrix = new Matrix(); mat.scale(0.5, 0.5); aux.draw(graph.bitmap, mat); graph.bitmap = aux; }