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

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

51. List表单renderHandler问题 [ 72%]

...:Array = null, once:Boolean = true):Handler {             if (_pool.length) return _pool.pop().setTo(caller, method, args, once);             return new Handler(caller, method, args, once);         }   2018-07-04 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 ...

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

52. 对象池创建,sprite越来越高的问题 [ 71%]

...始化创建角色。 在其他js里从对象池创建。var snakeAI=Laya.Pool.getItemByClass("snake",Snake); 这样的话。sprite是正常的。 方法二 这个是在面向对象里写好初始化创建角色的方法init。 在其他js里从对象池创建。var snakeAI=Laya.Pool.getItemByClass(...

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

53. TypeError: Cannot read property 'length' of null [ 71%]

...体hero.prefab,b场景也包含预制体hero.prefab 在a场景通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)创建对象,同时给对象设置位置,成功 跳转到b场景后,通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)获取这个对象...

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

54. Laya.Handler.create 加载图片回调参数问题 [ 70%]

...:Array = null, once:Boolean = true):Handler {             if (_pool.length) return _pool.pop().setTo(caller, method, args, once);             return new Handler(caller, method, args, once);         }   看源码,这个参数应该写在回调方程 加,逗号的...

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

55. 嘛,我想问一下……有多久没有更新API文档了?._. [ 70%]

...1.6.0,然而与API文档中完全不一致,比如对象池API:Laya.Pool,在文档中找到的则是Laya.Util.Pool。 如果不打算更新API文档的话……我觉得我还是用回旧版本的引擎吧,起码一些东西都能在API文档中查询到并且一一进行对应。 然后就...

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

56. 为什么会出现报错 ani not found:ufo1_down [ 69%]

...息 role.isBullet = false; role.visible = true; // 回收到对象池 Laya.Pool.recover("role",role); } } // 处理发射子弹逻辑 if(role.shootType > 0) { // 获取当前浏览器时间 var time = Laya.Browser.now(); // 如果当前时间大于下次射击时间 if(time > role.shootTime) {...

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

57. 请问一下怎样动态加载prefab [ 69%]

...在论坛中也查找了一些做法  1.    let box: Laya.Sprite = Laya.Pool.getItemByCreateFun("dropBox", this.dropBox.create, this.dropBox); 这个会在create的时候报错 2. prefab:Prefab = Laya.Load.getRes("prefab/xxx"); 这个获取prefab直接就是个空   请问一下 这个到底是...

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

58. 内存优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 68%]

...LayaAir引擎的对象池类 LayaAir引擎提供了对象池类[laya.utils.Pool](https://layaair2.ldc2.layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=Core&category=Utils&class=laya.utils.Pool),用于对象的存贮、重复使用。比较常用的是`对象池创建`方法`getItemByCla...

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

59. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 67%]

...LayaAir引擎的对象池类 LayaAir引擎提供了对象池类[laya.utils.Pool](https://layaair2.ldc2.layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=Core&category=Utils&class=laya.utils.Pool),用于对象的存贮、重复使用。比较常用的是`对象池创建`方法`getItemByCla...

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

60. 为什么会出现报错 ani not found:ufo1_down [ 67%]

...息 role.isBullet = false; role.visible = true; // 回收到对象池 Laya.Pool.recover("role",role); } } // 处理发射子弹逻辑 if(role.shootType > 0) { // 获取当前浏览器时间 var time = Laya.Browser.now(); // 如果当前时间大于下次射击时间 if(time > role.shootTime) {...

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