大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0049 秒)
...true; rg.selectHandler = new Laya.Handler(this, this.onSelectChange); this.owner.addChild(rg); return rg; } private onSelectChange(index: number): void { console.log("你选择了第 " + (index + 1) + " 项"); } } 效果如图所示: (图3-1) Copyright ©Layabox 2025 all right reserved,power...
来源: Laya3.0_文档 发布时间: 20251016
...到的物体 this.text.text = "点击到了" + this._outHitResult.collider.owner.name; } } } 2020-09-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要回复问题请先...
来源: Laya_社区 发布时间: 20200917
...orldRoot為當前容器 Laya.Physics.I.worldRoot = <Laya.Sprite>this.owner; } 雖然寫在onEnable畫面一開始會閃一下,但運作都正常,感謝回應
来源: Laya_社区 发布时间: 20181215
...点被添加到舞台后 onEnable(): void { let a = this.owner.getChildByName("Sprite3D") as Laya.Sprite3D; console.log(a,typeof(a)) let aa = a.addComponent(Laya.Rigidbody3D); } 报错 TypeError: Cannot read properties of undefined (reading &apo...
来源: Laya_社区 发布时间: 20240102
...用parent去做转换,把代码下面这样也行: const pos = (this.owner as Laya.Sprite).localToGlobal(new Laya.Point(0, 0)); 2025-08-15 1 1 分享 微博 QZONE 微信 Recovery 赞同来自: ??? 2025-08-12 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题...
来源: Laya_社区 发布时间: 20250528
.../Script1.ts @regClass() export class Script1 extends Laya.Script { declare owner : Laya.Sprite3D; } //TestCustomEditor.ts @IEditorEnv.customEditor(Script1) export class TestCustomEditor extends IEditorEnv.CustomEditor { declare owner: Laya.Sprite3D; onSceneGUI(): void { IEditorEnv.Handles.drawHemiSp...
来源: Laya3.0_文档 发布时间: 20251010
...riteTransform, avatarWorldMatrix, avatarWorldMatrix); Matrix4x4.multiply((_owner as Sprite3D)._transform.worldMatrix, avatarWorldMatrix, spriteWorldMatrix); 138*****175 • 2017-09-06 11:38 @我觉得挂空节点是可以省的吧?如果可以省,少了一层,也算是优化吧? 183*****755 ...
来源: Laya_社区 发布时间: 20170904
...访问访问私有成员。 示例如下: let animator: Animator = this.owner.getChildAt(0).getComponentByType(Animator) as Animator; let clipNames: string[] = animator["_clipNames"]; 来个点赞吧!!!鄙视官方的不作为! 2018-04-26 3 2 分享 微博 QZONE 微信 w1114367261 赞同...
来源: Laya_社区 发布时间: 20180425
... } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake()...
来源: Laya3.0_文档 发布时间: 20251010
...少帧自动销毁的Script,只是在onUpdate里面记个时然后调用owner的destory方法,在new出来的Sprite里添加脚本时脚本被创建成功了,但是sprite被添加到场景后却没有走到脚本里的onActive等方法里面,断点看我写的组件脚本在我的sprite里...
来源: Laya_社区 发布时间: 20181122