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

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

151. 物体的x,y输出不一致的问题 [ 79%]

...息不一致: var player :Player = Laya.stage.getChildAt(i) as Player; console.log(player.x); 附:在Player中输出x的信息 一直为0 但是在Monster类中输出Player的x的数据一直是497,0,494,0,491,0,488,0.......这样的 2018-08-28 添加评论 免费帖 --> 分享 微...

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

152. 新手引导 挖洞 不用 cacheAs="bitmap" 希望能帮助那些和我一样有需求的码农!你好我好大家好才是真的好!请各位大佬批评指教! [ 79%]

...         var pixelRatio = Laya.Browser.pixelRatio;         console.log(browserWidth + " " + browserHeight + " " + pixelRatio);          // 获取canvas元素对应的DOM对象         var canvas = document.getElementById('canvas');         var div1 = document...

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

153. Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); [ 79%]

...ya.Event.RESIZE,this, this.ChangeSize); private ChangeSize() {         console.log("---------------")         if(Laya.Browser.window.innerHeight < Laya.Browser.window.innerWidth) {             console.log("横屏")         } else {             console.log("竖屏")     ...

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

154. 微信小游戏Worker使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

... 在workers/index.js中增加事件监听、图片处理与事件派发: console.log("worker/request/index.js") // 在 Worker 线程执行上下文会全局暴露一个 `worker` 对象,直接调用 worker.onMessage/postMessage 即可 worker.onMessage(function (data) { console.log("worker -------...

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

155. [LayaAir3]Laya.Slider 的结束拖拽的事件监听 怎么写, [ 78%]

...     this.owner.bar.on(Laya.Event.MOUSE_UP, () => {             console.log("aaa");         })     } 2025-07-11 0 1 分享 微博 QZONE 微信 Archangelᴱᴿᴵᑦ 赞同来自: this.owner.on(Laya.Event.CHANGE, this, () => { console.log("在拖着"); }); this.owner.on(Laya.Event...

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

156. 音频在设置音量大小scale=0时SoundManager无法回调, 并且阻塞所有laya本身的callback [ 78%]

...t中: SoundManager.playSound("XXX", this, ()=>{             console.log('触发1');             Laya.timer.scale = 0;             SoundManager.playSound("XXX", this, ()=>{                 console.log('触发2');                ...

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

157. 没有预加载的图片怎么获取width和height ? [ 78%]

.../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(older.scaleX,older.scaleY,older....

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

158. 如何保存本地log日志 [ 78%]

...画在画布上 本地双击html如何打开laya项目? laya如何重写console.log 打印错误跟信息到自己写的日志面板上 小游戏启用版本管理和设置本地包会冲突么 请问从远程网络获取的json数据,怎么保存在本地内存之中呢或本地保存? 小游...

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

159. Laya.Pool.getItemByClass 找不到上次释放的对象 [ 78%]

...nd= Laya.Pool.getItemByClass("mybg",BackGround); Laya.stage.addChild(bg1); console.log("bg1->",bg1); //对象放回Pool里,并清除对象 Laya.Pool.recover("mybg",BackGround); bg1.removeSelf(); Laya.stage.removeChild(bg1); console.log("bg1->",bg1); //再次从Pool里获取对象的时候,...

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

160. 关于Sprite回收 [ 78%]

...       for(var i = 0; i < this.numChildren; i++) {             console.log(this.numChildren);             var item = this.getChildAt(i);             if(item instanceof Item) {                 item.removeSelf();                 item.visible = true;         ...

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