public function LayaAirDemo()
{
Laya.init(800,800);
Laya.loader.load('logo.png',Handler.create(this,onLoaded));
}
private function onLoaded():void
{
var texture:Texture=Loader.getRes('logo.png');
var sp:Sprite=new Sprite();
sp.graphics.clear();//把上次的绘制清除
sp.graphics.drawTexture(texture);
Laya.stage.addChild(sp);
}
1 个回复
cuixueying
赞同来自: