大约有 140 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0062 秒)
Laya_社区(76) Laya2.0_文档(27) Laya3.0_api(22) Laya3.0_文档(8) Laya2.0_示例(3) laya_api(2) Laya2.0_api(2)
...is.tMap.createMap("resources/TiledMap/orthogonal.json", viewRect, new Laya.Handler(this, this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHa...
来源: Laya3.0_文档 发布时间: 20251010
... CheckBox 实例。 package { import laya.ui.CheckBox; import laya.utils.Handler; public class CheckBox_Example { public function CheckBox_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/check...
来源: Laya3.0_api 发布时间: 20231115
... Parameters url: string Returns boolean load load(url: string, complete?: Handler): Promise<void> Defined in laya/resource/Texture.ts:277 加载指定地址的图片。 Parameters url: string 图片地址。 Optional complete: Handler 加载完成回调 Returns Promise<void> off off(type...
来源: Laya3.0_api 发布时间: 20231115
...yOpenDataContext 5.主域这边代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader; class GameBootstrap{ public constructor(){ this.init(); } private init():void{ //初始化微信小游戏 ...
来源: Laya_社区 发布时间: 20180529
...e = new Sprite(); sp.loadImage("res/apes/monkey2.png", 0, 0, 0, 0, Handler.create(this, function() { console.log(sp.width, sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 3. **直接调用size设置...
来源: Laya2.0_文档 发布时间: 20210715
...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```javascr...
来源: Laya2.0_文档 发布时间: 20210715
... { Laya.loader.load(picAy[i],Handler.create(this, onAssetLoaded)) } } private function onAssetLoaded(texture:Texture):void { var ape:Sprite = new Sprite; ...
来源: Laya_社区 发布时间: 20161023
...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescr...
来源: Laya2.0_文档 发布时间: 20210714
...aya.loader.load(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoading: " + progress); } //加载完毕 function onLoaded(){ console.log("...
来源: Laya_社区 发布时间: 20160722
...功后,执行onLoad回调方法 Laya.loader.load("res/atlas/ui.atlas", Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```java //创建一个Animation实例 var tl:Animation = new Animation(); //加载动画文件 tl.loadAnimation("TimeLine.ani"); ``` ...
来源: Laya2.0_文档 发布时间: 20210715