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

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

101. [LayaAir3]【LayaAir 3.0.10】从对象池中取出的拖尾粒子addChild到Node后显示异常 [ 51%]

...对象池中取出的拖尾粒子addChild到Node后显示异常 使用Laya.Pool.getItem方法,从对象池中取出一个之前用过的拖尾粒子,Add到一个正在运动的节点后。 如节点坐标远离原点Vector3(0.0.0),拖尾会一瞬间出现从原点到挂载节点的迅速拉长...

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

102. laya.utils.Tween.to的第一个参数可以是个label? [ 51%]

...n = false, autoRecover:Boolean = true):Tween {             return Pool.getItemByClass("tween", Tween)._create(target, props, duration, ease, complete, delay, coverBefore, true, autoRecover, true);         } 接收值是泛型!!!!!!!!!!!! 接收值是泛型!...

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

103. prefab添加runtime脚本 comp._addComponentInstance is not a function [ 51%]

...507)     at Prefab.__proto.create (laya.core.js:19301)     at Function.Pool.getItemByCreateFun (laya.core.js:5825)     at GameControl.createBox (GameControl.js:54)     at GameControl.onUpdate (GameControl.js:39)     at TimerHandler.__proto.run (laya.core.js:7533)     at Timer.__proto._up...

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

104. 如何弄一个3d的prefab,或者说如果不能prefab,能不能写一个新类? [ 51%]

...this.bullet可以不是一个prefab吗?) let flyer: Laya.Sprite = Laya.Pool.getItemByCreateFun("bullet", this.bullet.create, this.bullet); 官方再忙,也帮忙回答一下这个问题吧:“是不是每一个对象都一定要有一个prefab” 如果有纯代码生成的办法有没有哪...

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

105. 关于UI与3D场景的问题 [ 51%]

...uot;,touchID); } this.removeTouchFromArr(touchID,preDowns); preO.tar=null; Pool.recover("TouchData",preO); } preO=this.getTouchFromArr(touchID,this.preOvers); if (!preO){ }else { if (onMobile){ sendArr=this.getEles(preO.tar,null,sendArr); if (sendArr && sendArr.length > 0){ this...

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

106. 如何动态生成已经创建好的.prefab到场景中? [ 50%]

...享 微博 QZONE 微信 月九 赞同来自: let box: Laya.Sprite = Laya.Pool.getItemByCreateFun("dropBox", this.dropBox.create, this.dropBox); 最新版本的引擎,创建预设只有这一个方法吗? 2018-12-14 0 1 分享 微博 QZONE 微信 潮巴巴 赞同来自: http://ask.layabox.com/que...

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

107. [LayaAir3]通过对象池创建的物体,发生碰撞后,再通过对象池复用就会出现pos函数找不到的情况 [ 50%]

...的是Bullet组件不是你想要的Laya.Box;所以回收时应为 Laya.Pool.recover("Bullet", this.owner); 2024-08-13 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 炳志要爆发 相关问题 两个对象new了一个相同的对象...

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

108. RenderTarget2D的create方法 [ 50%]

...ter:int = -1):RenderTarget2D {             var t:RenderTarget2D = POOL.pop();             t || (t = new RenderTarget2D(w, h));                          if (!t.bitmap || t._w != w || t._h != h || t._surfaceFormat != surfaceFormat || t._surfaceType != surfaceType ||...

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

109. 2.0新特性常见问题(TypeScript-常见问题汇总(持续更新)-2.0常见问题) [ 50%]

... onComplete(obj:Object):Void{ 一个预设变量.json = ojb 一个sprite = Pool.getItemByCreateFun("自己起一个名字", this.一个预设变量.create, this.一个预设变量); } ```

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

110. 在脚本里自定义IDE属性预制体数组类型获取的结果不对 [ 49%]

...           spr.json=obj;             var car:Sprite = Pool.getItemByCreateFun("Car", this.spr.create, this.spr);                          Laya.stage.addChild(bar);             bar.pos(Browser.clientWidth/2,Browser.clientHeight/2);       ...

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