大约有 11 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0028 秒)
...Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/img/monkey1.png"); //添加到舞台 Laya.stage.addChild(img); } } } ``` 在示例代码里,“`100,50`”是图片的显示坐标信息。示例代码运行效果如图2-1所示:  (图2-1) ### 1.3 用lo...
来源: Laya2.0_文档 发布时间: 20210715
...台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = ne...
来源: Laya2.0_文档 发布时间: 20210714
...台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(...
来源: Laya2.0_文档 发布时间: 20210715
...景色 Laya.stage.bgColor = "#ffffff"; //资源路径 this.Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ thi...
来源: Laya2.0_文档 发布时间: 20210715
...a.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage....
来源: Laya2.0_文档 发布时间: 20210715
...rite(); //添加到舞台 Laya.stage.addChild(Img); Img.loadImage("res/img/monkey1.png",200); ``` 运行效果如图1所示  (图1) ### 2、刷新显示对象节点树 默认状态下,显示对象节点树中只有`DebugInfoLayer`节点,而这个节点开发者不用管(用...
来源: Laya2.0_文档 发布时间: 20210715
...rite(); //添加到舞台 Laya.stage.addChild(Img); Img.loadImage("res/img/monkey1.png",200); } } new GameMain(); ``` 运行效果如图1所示  (图1) ### 2、刷新显示对象节点树 默认状态下,显示对象节点树中只有`DebugInfoLayer`节点,而这个节点开发...
来源: Laya2.0_文档 发布时间: 20210715
...rite(); //添加到舞台 Laya.stage.addChild(Img); Img.loadImage("res/img/monkey1.png",200); } } } ``` 运行效果如图1所示  (图1) ### 2、刷新显示对象节点树 默认状态下,显示对象节点树中只有`DebugInfoLayer`节点,而这个节点开发者不用管...
来源: Laya2.0_文档 发布时间: 20210714
...ar assets = []; assets.push("res/apes/monkey0.png"); assets.push("res/apes/monkey1.png"); assets.push("res/apes/monkey2.png"); assets.push("res/apes/monkey3.png"); Laya.loader.load(assets, Laya.Handler.create(this, onAssetsLoaded)); function onAssetsLoaded() { for (var i = 0, len = assets.length; i ...
来源: Laya2.0_文档 发布时间: 20210715
...ets: Array = [] assets.push("res/apes/monkey0.png"); assets.push("res/apes/monkey1.png"); assets.push("res/apes/monkey2.png"); assets.push("res/apes/monkey3.png"); Laya.loader.load(assets, Laya.Handler.create(this, onAssetsLoaded)); function onAssetsLoaded():void { for(var i:number = 0, len: number ...
来源: Laya2.0_文档 发布时间: 20210715