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

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

361. TS项目,index.html 里面的js代码如何调用项目里面的函数,window.addEventListener 在ts项目里面该怎么写 [ 67%]

....addEventListener('message', function(e) {                 console.log(e.data);        //分享成功之后这个参数是true         }, false);     </script>   window.addEventListener 在ts项目里面该怎么写  是直接这样写,还是这样写:...

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

362. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 67%]

...ScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1,'pass'); console.log('打印=======================================') console.log(idx, pass, this.map['_tileProperties'],this.map['_tileProperties2']); // 30 null {0:undefined} {} } }求官方给个回复 附件 : --> 2DTiled.zip 2019...

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

363. 在写屏蔽词库的程序时,字符串中没有屏蔽字库中的词,会出现返回0的情况 [ 67%]

...leName) != -1) { var index:number=this.shieldArray.indexOf(this.roleName); console.log("找到了,位置在"+index); return true; } console.log("没找到"); return false } cuixueying • 2017-08-28 11:56 https://ask.layabox.com/question/6734 Liu_1986 • 2017-08-28 11:38 已经...

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

364. 获取sprite对象的 width和height为0 [ 67%]

....Rectangle = bg.getBounds(); var btBound: Laya.Rectangle = bg.getBounds(); console.log(bgBound.width/2) console.log(bgBound.height - 150) bt.pos(bgBound.width/2 - btBound.width/2,bgBound.height - 150) } } //启动游戏 new Game();打印结果: 0 -150 bgBound.width 和 bgBound.heigt 都为0  2016...

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

365. load方法加载cdn上面的图片资源的时候直接报了跨域不同源的问题,怎么破? [ 67%]

...essBar.png', STATIC_IMG_PATH+'progressBar$bar.png' ]; this.isFirst = true; console.log('Gzdaze='); console.log(Gzdaze); Laya.loader.load(Gzdaze.dialogList, Handler.create(this, this.startLoaded)); 代码是这样的 报错 Access to Image at 'http://caifu-1251177394.file.myqcloud.com/beta/book/bookL...

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

366. 发布小米快游戏没有二维码也没有rpk文件 [ 67%]

...在 但是 并没有 publishProWin3属性   是在 IDE的谷歌tools的 console里面加入的 上午我就试了 2019-06-04 0 1 分享 微博 QZONE 微信 k642015631 赞同来自: 已上传日志 Laya日志.zip 2019-06-04 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该...

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

367. 通过getChildByName找到的dialog节点使用show方法后, 再次getChildByName查找, 结果为null [ 67%]

... let childNode = parentNode.getChildByName('Dialog'); childNode.show();   console.log(parentNode.getChildByName('Dialog'));  // 结果为null   2016-09-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueyi...

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

368. 求问sprite放大后,graphics绘制的图像位置偏移 [ 67%]

...正确 sprite.scale(scaleRatio, scaleRatio); Laya.stage.addChild(sprite); console.log(sprite.width); console.log(sprite.height); 比如我在一个sprite的中心画一个圆,用scale放大后,圆偏离中心。 必须在原位置减去位置除以缩放比才能达到想要的效果。 附件 :...

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

369. 关于截屏的问题 [ 67%]

...但是报错了,,能帮忙看下怎么处理吗?   代码如下: console.log("onCharge-------------------------1"); if( Laya.Browser.window.conch ) { console.log("onCharge-------------------------2"); Laya.Browser.window.conch.captureScreen(function(arrayBuff,width,height){ console.log("onC...

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

370. layaAirIDE中如何使用wx等微信基础对象,ide版本1.7.19.1beta [ 67%]

....login({ success: function () { wx.getUserInfo({ success: function (res) { console.log('success', res) }, fail: function (res) { console.log("reject",res) } }) } }); 这段代码里的wx对象,报错如下 "wx is not defined" 2018-07-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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