• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 82 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)

1. [LayaAirIDE3]2d相机打包后问题 [ 100%]

...EIGHT;          // 摇杆事件监听         this.joystickScript.owner.on(Joystick.MOVE, this, (data: any) => {             this.playerScript.move(data.direction, data.force);         });          this.joystickScript.owner.on(Joystick.END, this, () => {           ...

来源: Laya_社区 发布时间: 20251125

2. 物理碰撞脚本和触发器脚本(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 90%]

...触发(子弹进入物品时) * 此处当触发器进入时将脚本的owner(所属节点)第一个实例材质的漫反射颜色改为绿色 * 注:如相对移动速度过快,可能直接越过 */ public onTriggerEnter(other:Laya.PhysicsComponent):void { ((this.owner as Laya.MeshSprite3...

来源: Laya2.0_文档 发布时间: 20210715

3. CameraMoveScript.as在哪儿下载群里的有错 [ 89%]

...ublic function CameraMoveScript() { } override public function _initialize(owner:Sprite3D):void { super._initialize(owner); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); Laya.stage.on(Event.MOUSE_OUT, this, mouseOut); var camera:BaseCamera = owner.sc...

来源: Laya_社区 发布时间: 20170218

4. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 89%]

....display.Sprite; import laya.events.Event; public class Btn { private var _owner:Sprite; private var _isScal:Boolean; public function Btn() { trace("btn的附加类已经开始执行"); } //设置owner函数,可以直接获取到Button组件的实例 public function set owner(v:Sprite):void { _own...

来源: Laya_社区 发布时间: 20161014

5. 附加脚本的使用问题 [ 88%]

...r() {         console.log("加载ScaleButton");     }     private _owner: any;     public set owner(o: laya.display.Sprite) {         this._owner = o;         console.log("设置owner");     }     public get owner(): laya.display.Sprite {         return this._owner;     }...

来源: Laya_社区 发布时间: 20170601

6. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 85%]

...---Script3D中的鼠标事件。如果想要使用鼠标脚本,在脚本owner上还是需要有物理碰撞器。 **Tips**:鼠标脚本依赖射线检测,只不过不用开放者自己手动创建射线了。 **鼠标脚本内容:** > Method `onMouseClick():void` 鼠标点击时执行 `onMou...

来源: Laya2.0_文档 发布时间: 20210715

7. 我竟然被射线检测这个小功能给难了一天了 [ 85%]

...esult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(this.owner.getChildByName("Main Camera...

来源: Laya_社区 发布时间: 20190621

8. 2.6.1物理bug [ 85%]

...地面都设置了弹力   TestScript2  onAwake   this.scene3D = this.owner as Scene3D; this.basketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collis...

来源: Laya_社区 发布时间: 20200512

9. laya2 物理引擎好多问题 [ 85%]

... onTriggerEnter(e:Laya.RigidBody):void{  var cil:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider); var rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody); cil.enabled=false; rig.enabled=false; var self:Laya.Sprite= this.owner as Laya.Sprite; var ni:Laya.Animation=new Laya.An...

来源: Laya_社区 发布时间: 20190721

10. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

... void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation++; } //开始碰撞时执行 onTrigg...

来源: Laya3.0_文档 发布时间: 20251010