• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 4 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0027 秒)

1. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...送HTTP请求之后,我们直接通过异步事件的帧听,在事件回调方法里处理响应结果。完整的示例代码如下: import Event = Laya.Event; import HttpRequest = Laya.HttpRequest; const { regClass } = Laya; @regClass() export class Network_GET extends Laya.Script { private ...

来源: Laya3.0_文档 发布时间: 20251010

2. 网络通信 · LayaAir3文档 · LAYABOX [ 98%]

...sources文件夹下新建一个data.txt文件 //设置完成事件,添加回调方法 http.once(Laya.Event.COMPLETE, this, this.completeHandler); //设置错误事件,添加回调方法 http.once(Laya.Event.ERROR, this, this.errorHandler); //设置进度事件,添加回调方法 http.on(Laya.E...

来源: Laya3.0_文档 发布时间: 20250104

3. 场景管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

...数,会传递给onOpened方法(可选) * @param complete 打开完成回调,返回场景实例(可选) * @param progress 加载进度回调(可选) */ static open(url: string, closeOther: boolean = true, param: any = null, complete: Handler = null, progress: Handler = null): Promise&...

来源: Laya3.0_文档 发布时间: 20251010

4. 2D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

...width,sp.height); })); Laya.stage.addChild(sp); loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 直接调用size设置: Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new...

来源: Laya3.0_文档 发布时间: 20251010