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

大约有 483 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0044 秒)

81. 获取的ui页面里下on事件无法触发 [ 77%]

... 类代码如下: var GameStartView = function () { GameStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,"GameStartView", GameStartUI); 输出:Butt...

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

82. 3D 鼠标检测 错乱 [ 77%]

...了 修改laya.d3.js _update方法为 _update() { var i=0,n=0,j=0,m=0; n=this._eventList.length; var cameras=this._scene._cameraPool; if (n > 0){ for (i=0;i < n;i++){ var e=this._eventList; switch (e.type){ case "mousedown": this._mouseTouchDown(); break ; case "mouseup": this._mouseTouchUp();...

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

83. 我竟然被射线检测这个小功能给难了一天了 [ 77%]

...esult=new Laya.HitResult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(this.owner.getChild...

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

84. TypeScript Json 数据解析 [ 77%]

...te on2DComplete(): void { Laya.loader.load("zxc.json", Laya.Handler.create(this,this. onLoadConfigComplete),null,Laya.Loader.JSON); } wayPoints:JSON; private onLoadConfigComplete(): void { this.wayPoints = Laya.loader.getRes("zxc.json") as JSON; console.log(this.wayPoints.name); //这里会报name ...

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

85. Timer.clear清理同caller同method的多个loop [ 77%]

...掉。   下面是大概的代码:main(): void{ Laya.timer.loop(1000, this, this.loopFunc, [1], false); Laya.timer.loop(500, this, this.loopFunc, [2], false); ... ... Laya.timer.clear(this, loopFunc); Laya.timer.clear(this, loopFunc); } loopFunc(data: any):void{} 2020-02-06 添加评论 免费帖...

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

86. 对话框点击空白处无法关闭 [ 77%]

...话框var testUI=(function(_super){ function testUI(){ testUI.__super.call(this); } CLASS$(testUI,'ui.testUI',_super); var __proto__=testUI.prototype; __proto__.createChildren=function(){ laya.ui.Component.prototype.createChildren.call(this); this.createView(testUI.uiView); } testUI.uiView={"type":"...

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

87. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 77%]

[LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 laya3 加载资源后使用 Laya.loader.on(Event.ERROR, this, this.onError) 无法获得加载失败响应,根据示例里的错误处理和进度操作也得不到错误的响应,laya2里是可以的...

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

88. phasorSpriter3D 无法使用 [ 76%]

phasorSpriter3D 无法使用 Laya.timer.frameLoop(1, this, () => { this.phasorSpriter3D = new Laya.PhasorSpriter3D(); var _color = new Laya.Vector4(1, 0, 0, 1); var _corners = new Array<Laya.Vector3>(); _corners[0] = new Laya.Vector3(); _corners[1] = new Laya.Vector3(); _corners[2] = new L...

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

89. protobuffer加载失败 [ 76%]

...败:     Laya.loader.load(["res/protobuf/user.proto"], Handler.create(this, onAssetsLoaded)); 错误提示如下: [warn]Retry to load: E:/LayaBox/ProtobufLoadTest/bin/res/protobuf/user.proto [error]Failed to load: E:/LayaBox/ProtobufLoadTest/bin/res/protobuf/user.proto 但是去掉方括号 ...

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

90. 预加载音频文件遇到的问题 [ 76%]

...源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.create(this, onComplete)); } function onComplete(){ console.log("播...

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