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

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

281. 两个小问题 [ 51%]

...个面板中含有几个按钮,分别为按钮添加 this.myBtn.on(Event.CLICK) 事件,点击某按钮后有时还会发送事件 this.event(...),在关闭面板时设置 this.removeSelf() ,下次生成同类型的对象面板可正常打开;若在关闭时设成 this.destroy() 或 this.de...

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

282. 背景音乐来回切换报错 [ 51%]

...und:Laya.SoundChannel = null;         this.btn_sound.on(Laya.Event.CLICK,this,function(){             dreamsSound = null;             if(mainSound == null){                 Laya.loader.load("res/main.mp3",Laya.Handler.create(this,function(){      ...

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

283. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...ector: "Buttons", options : { buttons : [ { caption : "点我", event: "my_click" } ] } } ] } ]); this._panel.allowUndo = true; //根据需要设置 //如果不需要undo功能,也可以直接this._data = {}; this._data = IEditor.DataWatcher.watch({}); //inspect可以多次调用,将多个数据...

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

284. Laya.loader.load 教程代码出错 [ 51%]

...        Laya.stage.addChild(img);             img.on("click",this,OnImgClick);             OnImgClick();                          var txt:Text = new Text();             txt.text = "loadcomplated!";             Laya.stage...

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

285. 模型的功能介绍(JavaScript-3D基础(JS)-LayaAir3D之模型和网格) [ 50%]

...0; //.............按钮点击事件 监听 changeMeshButton.on(Laya.Event.CLICK, this, function(){ index++; if (index % 5 === 1 ){ //切换mesh sphere.meshFilter.sharedMesh = box; } else if (index % 5 === 2){ //切换mesh sphere.meshFilter.sharedMesh = capsule; } else if(index % 5 === 3){ //切换m...

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

286. 模型的功能介绍(TypeScript-3D基础(TS)-LayaAir3D之模型和网格) [ 50%]

...0; //.............按钮点击事件 监听 changeMeshButton.on(Laya.Event.CLICK, this, function(){ index++; if (index % 5 === 1 ){ //切换mesh sphere.meshFilter.sharedMesh = box; } else if (index % 5 === 2){ //切换mesh sphere.meshFilter.sharedMesh = capsule; } else if(index % 5 === 3){ //切换m...

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

287. 物理引擎,刚体施加力效果错误,有人帮忙看下吗 [ 50%]

...dbody3D) as Rigidbody3D; }));   //施加作用力或冲量 btn_a.on(Event.CLICK,this, function():void{ _rb.applyImpulse(new Vector3(0, 0, -2000)); })     附件 : --> 3D_DEMO_190402精简.zip 2019-04-17 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请:...

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

288. 我在dialog a上继续弹出dialog b 。需要关闭b的时候,a依然存在。怎么做? [ 50%]

...e is DlgNote2"); this.closeEffect = null; this.closeBtn.on(Laya.Event.CLICK, this, this.toClose); //this.show(); } b的关闭方法: toClose():void{ //Laya.Scene.open("datiPage.scene"); this.close(); } a和b都是独立的ts类, export default class a extends ui.a {……} 同时a...

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

289. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 49%]

...ipt Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); private function dispose():void  {     Laya.timer.clear(this, animateFrameRateBased); } ``` ​ 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显...

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

290. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 49%]

...cript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在...

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