大约有 2 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0014 秒)
...; this._text.text = (this._level + ""); owner.getComponent(Laya.RigidBody).setVelocity({ x: 0, y: -10 }); Laya.SoundManager.playSound("resources/sound/hit.wav"); } else { if (owner.parent) { let effect: Laya.Sprite = Laya.Pool.getItemByCreateFun("effect", this.createEffect, this); owner.parent.addCh...
来源: Laya3.0_文档 发布时间: 20251010
...度 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 { //如果子弹超出屏幕,则移除子弹 if ((...
来源: Laya3.0_文档 发布时间: 20251010