大约有 121 项符合查询结果, 库内数据总量为 30,902 项。 (搜索耗时: 0.0040 秒)
...= 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_文档 发布时间: 20240910
...erShape=null; this._simulation=null; (this.owner).transform.off(/*laya.events.Event.TRANSFORM_CHANGED*/"transformchanged",this,this._onTransformChanged); } 2019-03-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...
来源: Laya_社区 发布时间: 20190318
...; } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果...
来源: Laya3.0_文档 发布时间: 20250103
... } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake()...
来源: Laya3.0_文档 发布时间: 20250103
...建文本组件 this.text = new Laya.Text(); this.text.pos(300, 260); this.owner.addChild(this.text); // 滚动条皮肤资源 var skins: any[] = []; skins.push("atlas/comp/hscroll.png", "atlas/comp/hscroll$bar.png", "atlas/comp/hscroll$down.png", "atlas/comp/hscroll$up.png"); Laya.loader.load(skins...
来源: Laya3.0_文档 发布时间: 20240910
...建文本组件 this.text = new Laya.Text(); this.text.pos(300, 260); this.owner.addChild(this.text); // 滚动条皮肤资源 var skins: any[] = []; skins.push("atlas/comp/vscroll.png", "atlas/comp/vscroll$bar.png", "atlas/comp/vscroll$down.png", "atlas/comp/vscroll$up.png"); Laya.loader.load(skins...
来源: Laya3.0_文档 发布时间: 20240910
...少帧自动销毁的Script,只是在onUpdate里面记个时然后调用owner的destory方法,在new出来的Sprite里添加脚本时脚本被创建成功了,但是sprite被添加到场景后却没有走到脚本里的onActive等方法里面,断点看我写的组件脚本在我的sprite里...
来源: Laya_社区 发布时间: 20181122
...件赋值,其它组件的引用全是不对的 但是如果通过this.owner.getChildByName("testLb") 这种方式,就是正常的,这能优化下?????? 附件 : --> demo5.zip 2021-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...
来源: Laya_社区 发布时间: 20211026
...到的物体 this.text.text = "点击到了" + this._outHitResult.collider.owner.name; } } } 2020-09-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要回复问题请先...
来源: Laya_社区 发布时间: 20200917
...能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = this.target.x - 400; this.came...
来源: Laya_社区 发布时间: 20190214