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

大约有 435 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0039 秒)

1. onoff的bug [ 100%]

onoff的bug 是这样的,我写了类似这样的代码a.on(Laya.Event.MOUSE_DOWN, this, onStartDrag); 之后我想去掉拖动,就写了a.off(Laya.Event.MOUSE_DOWN, this, onStartDrag); 但发现不行,于是我改成a.offAll(); 就可以了。 需要说明的是onStartDrag是函数内定...

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

2. 2D物理-碰撞过滤器 [ 96%]

...Target.pos(Laya.stage.mouseX, Laya.stage.mouseY); } mouseUp() { Laya.stage.off(Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.off(Event.MOUSE_UP, this, this.mouseUp); Laya.stage.off(Event.MOUSE_OUT, this, this.mouseUp); let rigidbody: RigidBody = this.curTarget.getComponent(RigidBody); rigidbod...

来源: Laya2.0_示例 发布时间: 20241002

3. laya.device.Shake_API3.0 [ 91%]

...ndex Constructors constructor Accessors instance Methods event hasListener off offAll offAllCaller on once start stop Constructors constructor new Shake(): Shake Defined in laya/device/Shake.ts:23 Returns Shake Accessors Static instance get instance(): Shake Defined in laya/device/Shake.ts:32 Return...

来源: Laya3.0_api 发布时间: 20231115

4. Laya.EventDispatcher off 删除侦听器 [ 91%]

Laya.EventDispatcher off 删除侦听器       var eventDis = new Laya.EventDispatcher()     eventDis.on('TEST_EVENT_DIS', this, someEventHandler, null)     eventDis.off('TEST_EVENT_DIS', this, another_eventHandler, false) off 怎样才能 从 EventDispatcher 对象中删除侦听器? ...

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

5. laya.d3.webxr.core.AxiGamepad_API3.0 [ 91%]

...perties axisLength handness EVENT_OUTPUT Methods destroy event hasListener off offAll offAllCaller on once Properties axisLength axisLength: number Defined in laya/d3/WebXR/core/WebXRGamepad.ts:16 轴数量 handness handness: string Defined in laya/d3/WebXR/core/WebXRGamepad.ts:12 轴设备名字 St...

来源: Laya3.0_api 发布时间: 20231115

6. 鼠标交互-滑动 [ 91%]

...ginPosition); } /**抬起事件处理*/ function onMouseUp(e) { Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); Laya.stage.off(Event.MOUSE_UP, this, onMouseUp); Laya.stage.off(Event.MOUSE_OUT, this, onMouseUp); // 滑动到目的地 var dist = Laya.stage.mouseX - buttonPosition; var targetX = b...

来源: Laya_示例 发布时间: 20241002

7. laya.media.Sound_API3.0 [ 90%]

...cher Sound Index Accessors duration Methods dispose event hasListener load off offAll offAllCaller on once play Accessors duration get duration(): number Defined in laya/media/Sound.ts:31 获取总时间。 Returns number Methods dispose dispose(): void Defined in laya/media/Sound.ts:38 释放声音...

来源: Laya3.0_api 发布时间: 20231115

8. laya.device.motion.Gyroscope_API3.0 [ 90%]

...ndex Constructors constructor Accessors instance Methods event hasListener off offAll offAllCaller on once Constructors constructor new Gyroscope(singleton: number): Gyroscope Defined in laya/device/motion/Gyroscope.ts:36 实例化一个Gyroscope Parameters singleton: number Returns Gyroscope Access...

来源: Laya3.0_api 发布时间: 20231115

9. 鼠标交互-滑动 [ 90%]

...*/ onMouseUp(e) { const Event = Laya.Event, Tween = Laya.Tween; Laya.stage.off(Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.off(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.off(Event.MOUSE_OUT, this, this.onMouseUp); // 滑动到目的地 let dist = Laya.stage.mouseX - buttonPosition; ...

来源: Laya2.0_示例 发布时间: 20241002

10. laya.d3.animation.AnimationTransform3D_API3.0 [ 90%]

...3D Index Constructors constructor Methods event getWorldMatrix hasListener off offAll offAllCaller on once setParent Constructors constructor new AnimationTransform3D(owner: AnimationNode): AnimationTransform3D Defined in laya/d3/animation/AnimationTransform3D.ts:30 创建一个 Transform3D 实例...

来源: Laya3.0_api 发布时间: 20231102