大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0058 秒)
...件赋值,其它组件的引用全是不对的 但是如果通过this.owner.getChildByName("testLb") 这种方式,就是正常的,这能优化下?????? 附件 : --> demo5.zip 2021-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...
来源: Laya_社区 发布时间: 20211026
...想要的Laya.Box;所以回收时应为 Laya.Pool.recover("Bullet", this.owner); 2024-08-13 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 炳志要爆发 相关问题 两个对象new了一个相同的对象,调用第一个的一个...
来源: Laya_社区 发布时间: 20240813
... QZONE 微信 Laya_Aaron 赞同来自: 可以在sript脚本里 通过 this.owner.getchildbyname("xx") 方式获取stage上的节点, runtime 脚本可以直接this.xx获取 可视化属性可以参照 https://ldc2.layabox.com/doc/?nav=zh-ts-3-4-0 文档中的方法,按照方法中的格式...
来源: Laya_社区 发布时间: 20181210
...其shinnedMeshRenderer直接点出属性isRender.完事 let mesh = this.owner.getChildAt(1) as Laya.SkinnedMeshSprite3D; console.log(mesh.skinnedMeshRenderer.isRender); 这是我测试时的模型和代码,实际使用根据模型的导出的层级和类型而定。附:我使用的是2.6.1...
来源: Laya_社区 发布时间: 20181009
...ther: any, self: any, contact: any): void { let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody; let velocity = rig.linearVelocity; console.log(velocity) } 你把初始弹射改成一个球,你就会发现,这个球,他的水平速度x 小于一定值后就变...
来源: Laya_社区 发布时间: 20200307
...} = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在构建发布配置项里手动添加...
来源: Laya3.0_文档 发布时间: 20251128
... } public transform: Transform3D; onStart(): void { this.transform = (this.owner as Laya.Sprite3D).transform; this.CurrentAngles = new Vector3(-this.transform.rotationEuler.x, this.transform.rotationEuler.y, 0); this.targetAngles = new Vector3(-this.transform.rotationEuler.x, this.transform.rotation...
来源: Laya_社区 发布时间: 20170714
... } = 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
...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Prefab }) private loadingScenePrefab: Laya.Prefab; private loadingScene: Laya.Node; constructor() { super(); } /** * 第一次执行update之前执行,只会执行一次 */ onSt...
来源: Laya3.0_文档 发布时间: 20251010
...vent.MOUSE_UP, this, this.mouseUp); this.camera = (<Laya.Camera>this.owner); } /** * 监听键盘事件 */ onUpdate(): void { var elapsedTime: number = Laya.timer.delta; if (!isNaN(this.lastMouseX) && !isNaN(this.lastMouseY) && this.isMouseDown) { Laya.InputManager.hasKeyDown(8...
来源: Laya3.0_文档 发布时间: 20251010