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

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

521. 循环监听按钮,如何进行传参和接受参数 [ 69%]

...这里监听循环按钮 for (let i: number = 1; i <= 2; i++) { let e = this.typeBox.getChildByName('btn' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         le...

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

522. 微信加载文件失败没有回调 [ 69%]

...rror")} LoadOK(){console.log("LoadOK")}   Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK));     发布成微信小游戏版本在真机微信上运行,发现这2个回调都没执行。   2018-09-20 添加评论 免...

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

523. spine 推荐使用方式 [ 69%]

...     */     __proto.destroyTexture=function(){         if(this._mainTexture!=null){             this._mainTexture.disposeBitmap();         }         this._needRecoverTexture = true;     }     /**      * 恢复纹理      */     __proto....

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

524. 关于官方技术文档中《微信飞机大战》实战开发中监听界面是否关闭 [ 69%]

...战》实战开发中监听界面是否关闭 //监听界面是否关闭 this.once(Event.CLOSE,this,onClose); /** * 界面关闭 */ private function onClose():void { console.log("GameStart界面关闭!"); //从舞台移除自己 this.removeSelf(); //只加载一次,因此直接消毁自己 this....

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

525. 怎么调用UI界面的属性 [ 69%]

...59643 • 2017-03-18 10:16 @Laya_XS:我建了一个UI的子类然后写了 this.btn_fapai.on("click", this, this.fapai);、 private function fapai():void { this.btn_kaipai.visible=true; } 没效果啊 cuixueying • 2017-03-18 10:31 看下IDE自动生成的Demo,里面就有用到! h690...

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

526. cavans上触发不了input的点击事件 [ 69%]

...事件 在舞台上添加一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发不了input控件。 <input id="f...

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

527. 调用原生js [ 69%]

...troy,以前clone的对象也消失了 调用动画结束on方法,报错this.zombieAnimator.on is not a function Laya.Scene.open打开的对话框中如何在关闭的时候调用父Scene中的方法 Laya2.1.0 JS调用Java PlatformClass undefined laya支持批处理调用js压缩吗? [闪退!!!...

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

528. 微信小游戏分包实战(TypeScript-小游戏适配文档-微信小游戏) [ 69%]

...ui:any; constructor(){ //监听按钮btnA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.GameMain.showUI(this.ui.bUI,this.GameMain.newUI) //监听按钮btnB的点击事件,触发后处理 this.GameMain.ne...

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

529. Cannot read property 'rayCast' of undefined [ 69%]

...ort default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D(); config3D.isAlpha = t...

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

530. 加载TiledMap 不显示 [ 69%]

...OWALL;         Laya.stage.bgColor = "#232628";          this.createMap();          Laya.stage.on("click", thisthis.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap();         this.tiledMap.create...

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