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

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

141. 切换后台时,引擎如何判断是否停止定时器? [ 79%]

...rameLoop);     }      private onFrameLoop():void{         console.log("delta:",Laya.timer.delta);     }      private onFocus(): void {         console.log("onFocus:");     }      private onBlur(): void {         console.log("onBlur:");     } }...

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

142. 物体的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

143. 新手引导 挖洞 不用 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

144. 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

145. 音频在设置音量大小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

146. 没有预加载的图片怎么获取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

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

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

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

148. 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

149. 关于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

150. module写法的模块无法使用,其他地方使用会报错 [ 78%]

...其他地方使用会报错 module bili{ export class Test{ constructor(){ console.log("Test"); } } } 2018-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 7 个回复 牛唠叨 赞同来自: Chiuan 其实就是那个2.0...

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