大约有 82 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
...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
...触发(子弹进入物品时) * 此处当触发器进入时将脚本的owner(所属节点)第一个实例材质的漫反射颜色改为绿色 * 注:如相对移动速度过快,可能直接越过 */ public onTriggerEnter(other:Laya.PhysicsComponent):void { ((this.owner as Laya.MeshSprite3...
来源: Laya2.0_文档 发布时间: 20210715
...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
....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
...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
...---Script3D中的鼠标事件。如果想要使用鼠标脚本,在脚本owner上还是需要有物理碰撞器。 **Tips**:鼠标脚本依赖射线检测,只不过不用开放者自己手动创建射线了。 **鼠标脚本内容:** > Method `onMouseClick():void` 鼠标点击时执行 `onMou...
来源: Laya2.0_文档 发布时间: 20210715
...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
...地面都设置了弹力 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
... 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
... 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