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

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

51. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 44%]

...如果设置为true,则点击空白区域可以穿透过去。” 2.Laya.Handler 我在处理技能时候用了对象池,其中类有对handler持有,再次使用时发现数据不对了,查找很久才发现handler调用了recover,被对象池再次生成对象引用覆盖了如...

来源: Laya_社区 发布时间: 20161109

52. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...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

53. 多线程Worker · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

... //加载引擎需要资源 Laya.loader.load("../atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; WorkerLoader.workerPath = "libs...

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

54. 多线程worker(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 42%]

...//加载引擎需要资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例UI界面 var testView = ui.test.TestPageUI(); Laya.stage.addChild(testView); } ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js路径,这个wor...

来源: Laya2.0_文档 发布时间: 20210715

55. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 41%]

...//加载引擎需要资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; ``` `WorkerLoader.workerPath = ...

来源: Laya2.0_文档 发布时间: 20210715

56. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 41%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫下,发现手机已经...

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

57. 单选框组容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 41%]

...#787878,#d3d3d3,#FFFFFF"; rg.labelSize = 20; rg.labelBold = true; rg.selectHandler = new Laya.Handler(this, this.onSelectChange); this.owner.addChild(rg); return rg; } private onSelectChange(index: number): void { console.log("你选择了第 " + (index + 1) + " 项"); } } 效果如图所示: (...

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

58. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 38%]

...文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:Texture = Laya.loader.getRes("comp/comp.png"); var sp:...

来源: Laya2.0_文档 发布时间: 20210714

59. 微信小游戏中不能加载proto文件 [ 37%]

... (function () { var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; console.log("!____________________________________")  var ProtoBuf = Browser.window.protobuf;  // Laya.init(550, 400);  ProtoBuf.load("res/protobuf/Login.proto", onAssetsLoaded);  function onAssetsL...

来源: Laya_社区 发布时间: 20180704

60. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 26%]

...* @return 返回精灵对象本身。 */ loadImage(url: string, complete?: Handler): Sprite; 我们来看看代码示例: let sprite = new Laya.Sprite(); // 加载并显示一个图片,居中显示 sprite.loadImage("atlas/comp/image.png", null); sprite.pos(Laya.stage.width >> 1, Laya.stage...

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