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

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

1. 场景调用offAll会报错。 [ 100%]

场景调用offAll会报错。 代码: scene = new Scene(); Laya.stage.addChild(scene); scene.offAll(); Laya.stage.removeChild(scene);  scene = new Scene(); Laya.stage.addChild(scene); scene.offAll(); Laya.stage.removeChild(scene); scene = new Scene(); Laya.stage.addChild(scene); Laya.stage.remo...

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

2. 取消监听鼠标移动事件,取消不了 [ 80%]

取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...

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

3. 2D物理-桥 [ 80%]

...t.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener()...

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

4. 2D物理-仿生机器人 [ 78%]

...t.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.Construct(); this.eventListener(); }...

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

5. 2D物理-复合碰撞器 [ 75%]

....Physics.enable({ gravity: 0 }); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBox(); this.eventListener(); }...

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

6. laya.physics.Physics_API3.0 [ 71%]

...此容器作为物理世界坐标世界,进行坐标变换,默认值为stage 设置特定容器后,就可整体位移物理对象,保持物理世界不变。 注意,仅会在 set worldRoot 时平移一次,其他情况请配合 updatePhysicsByWorldRoot 函数使用 Returns Sprite Defined ...

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

7. [LayaAirIDE3]xcode切入切出声音不播放 [ 52%]

...在xcode里面切入切出,导致背景声音不播放问题。  Laya.stage.on(Laya.Event.BLUR, this, this.onBlur); Laya.stage.on(Laya.Event.FOCUS, this, this.onFocus);  private onBlur() {         // 暂停所有需要停止的逻辑         console.log("onBlur");         SoundManage...

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

8. laya.display.Stage_API3.0 [ 52%]

...Protected All Inherited Externals Only exported Menu Globals "laya/display/Stage" Stage Class Stage Stage 是舞台类,显示列表的根节点,所有显示对象都在舞台上显示。通过 Laya.stage 单例访问。 Stage提供几种适配模式,不同的适配模式会产生不同的画...

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

9. laya.physics.Physics [ 52%]

...此容器作为物理世界坐标世界,进行坐标变换,默认值为stage 设置特定容器后,就可整体位移物理对象,保持物理世界不变PhysicsPublic Methods Hide Inherited Public Methods Show Inherited Public Methods MethodDefined By  Physics()Physics  enable(options:...

来源: Laya2.0_api 发布时间: 20190513

10. laya.display.Sprite_API3.0 [ 50%]

...() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); } private function onInit():void { sprite = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。 sprite.loadImage("resource/ui/bg.png");//加载...

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