大约有 110 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0031 秒)
onTriggerEnter判断和输出的other.name不正确 角色身上的onTriggerEnter 碰到球。 输出的other.name为 undefined. 球身上的onTriggerEnter 碰到地面trigger 输出other.name为 down ,这个没有问题。但是球碰到人物。 也是输出 down。 这就有问题了 附...
来源: Laya_社区 发布时间: 20220804
[LayaAir3]3d物理onTriggerEnter中的other参数不是PhysicsColliderComponent类型 版本3.1.1, 物理引擎为bullet, 在取collisionGroup时发现为undefined, 断点发现other类型为laya.bullet.js中的类, 并不是或继承自PhysicsColliderComponent,看了一下onCollisionEnter参数c...
来源: Laya_社区 发布时间: 20240307
onTriggerEnter(other:*, self:*, contact:*)如何使用第三个参数 请问layaAir 2.0中在脚本中重写onTriggerEnter(other:*, self:*, contact:*)时,第三个参数是什么意思?如何使用第三个参数? 2019-05-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20190523
...owner as Laya.Sprite).rotation++; } //开始碰撞时执行 onTriggerEnter(other: any): void { var owner: Laya.Sprite = this.owner as Laya.Sprite; if (other.label === "buttle") { //碰撞到子弹后,增加积分,播放声音特效 if (this._level > 1) { this._level--; this._text.text = (this...
来源: Laya3.0_文档 发布时间: 20251010
onTriggerEnter(other: any, self: any, contact: any) 参数使用 onTriggerEnter(other: any, self: any, contact: any) 参数使用 2020-04-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 ...
来源: Laya_社区 发布时间: 20200416
...撞信息后删除对方。 PlayerMove.prototype.onTriggerStay = function (other) { this.tsizex = this.box._components[0]._transformOrientedBoundBox.extents.x; this.tsizez = this.box._components[0]._transformOrientedBoundBox.extents.z; this.osizex = other._transformOrientedBoundBox.extents.x; this.o...
来源: Laya_社区 发布时间: 20181017
...onent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果子弹超出屏幕,则移除子弹 if ((this.owner as Laya.Sprite).y < -10) { this.ow...
来源: Laya3.0_文档 发布时间: 20251010
...erarchy CannonCollision Index Constructors constructor Properties contacts other Constructors constructor new CannonCollision(): CannonCollision Defined in laya/d3/physicsCannon/CannonCollision.ts:23 创建一个 Collision 实例。 Returns CannonCollision Properties contacts contacts: CannonContact...
来源: Laya3.0_api 发布时间: 20231102
...。 Hierarchy Collision Index Constructors constructor Properties contacts other Constructors constructor new Collision(): Collision Defined in laya/d3/physics/Collision.ts:23 创建一个 Collision 实例。 Returns Collision Properties contacts contacts: ContactPoint[] = [] Defined in laya/d3/phys...
来源: Laya3.0_api 发布时间: 20231115
...(pair.bodyA.label === 'gun' || pair.bodyB.label == "gun")) continue; var other; if (pair.bodyA.label === 'gun') { other = pair.bodyB; } else { other = pair.bodyA; } switch(other.label) { case "gameover": { home.onGameOver(); } break; case "coin": { home.gainCoin(1); } break; case "bullet":...
来源: Laya_社区 发布时间: 20180601