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

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

81. ts版本,开发微信小游戏,wxlocal的问题,,, [ 74%]

...加载wxlocal里面的资源,   Laya.loader.load(arr, Handler.create(this, this.onLoadComplete),Handler.create(this, this.onLoading, null, false)); 发现并没有去加载这个资源,加断点发现一样走到了URL.formatURL 这个函数里面, 然后和前面设置的那个ftp地址拼...

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

82. 2.0使用addComponent的组件,怎么删除?没有removeComponent [ 74%]

...: 2018-11-30 18:25 浏览: 1281 关注: 1 人 苏栢 • 2019-02-16 16:24 (this.player.getComponent(playerScript) as playerScript).destroy(); 或者 this.player._destroyComponent(this.player.getComponent(playerScript));

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

83. 在layabox里protobuf只能用回调的方式处理吗? [ 74%]

...,白鹭里加载我使用的是: import ProtoBuf = dcodeIO.ProtoBuf; this._protoBuilderMap ={user:ProtoBuf.loadProto(RES.getRes('user_proto'))}; 然后打包数据这样使用就可以了: let head: string = name.substring(0, name.indexOf('.')); let Message = this._protoBuilderMap[head].build(...

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

84. laya接入fairyGUI的时候资源加载方式? [ 74%]

...es/MainMenu.fui", type: laya.net.Loader.BUFFER }     ], Handler.create(this, this.onLoaded)); 资源加载能用其他方式吗? 不可能一个一个加载吧 2019-11-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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

85. native打包成app使用FileReader接口readAsArrayBuffer 时app崩溃 [ 74%]

...原因呢     doMsg:function(){                     if(this.msgs.length == 0 || !this.workDone){                         return;                     }                                      var data = this.msgs.shift();   ...

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

86. 微信飞机大战报错 [ 74%]

...= (function(_super){     function GameInfo(){         GameInfo.super(this);         this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick);         this.reset();     }     Laya.class(GameInfo, "GameInfo", _super);     var _proto = GameInfo.prototype;     _proto.reset = ...

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

87. 陀螺仪和加速计使用问题 [ 73%]

...仪和加速计使用问题 Laya.Gyroscope.instance.on(Laya.Event.CHANGE,this,this.onDeviceorientation);  Laya.Accelerator.instance.on(Laya.Event.CHANGE,this,this.onMotoin); 官网陀螺仪和加速计例子中的上面两句运行时都报 Cannot read property 'instance' of undefined 的错误 附...

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

88. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 73%]

...话只水平居中没有垂直居中。 调试的时候,在Layout.layout(this),跳进去 在Layout._multiLineLayout(element)里面的updatePos(0,tWidth,i,tY,align,valign,lineHeight)函数里对元素根据对齐方式重新设置坐标。这里面感觉对垂直居中的y坐标的计算方式...

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

89. 位图字体预加载 [ 73%]

...   bitmapFont.loadFont("../../../../res/bitmapFont/test.fnt",new Handler(this,onFontLoaded, [bitmapFont]));         }         private function onFontLoaded(bitmapFont:BitmapFont):void         {             bitmapFont.setSpaceWidth(10);             Text.registerB...

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

90. 使用Pool的时候创建的对象怎么传递参数 [ 73%]

...用Pool的时候创建的对象怎么传递参数 我之前是这样写的this.movingBlock = new MovingBlock(this.direction, movingBlockY), 但是这样每次都是new对象,太耗性能了,所以我用了这个,但是不知道怎么传递参数: this.movingBlock = Laya.Pool.getItemByClass...

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