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

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

241. loop 我想在回调里暂停,然后在开启 [ 72%]

...ticeList.scrollBar.value = i * 5        if (i % 6 == 0) {         console.log("在这里停止", i)        }       else{ console.log("在这里开始", i)        }  });   2017-07-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

242. websocket服务端显示连接成功,客户端未进行回调 [ 72%]

...p udp //创建server服务 var server = net.createServer(function (conn) { console.log('new connection is connecting') conn.write('\n hello buddy') }); server.listen(8081, function () { console.log('server is listening') // server.emit('connection'); }); 2019-04-23 添加评论 免费帖 --> 分享 ...

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

243. 布局后的对象的x y坐标如何获取? [ 72%]

...了centerX 和centerY后,就无法获取到这个Box的坐标了呀? console.log(this.test1.x ) //结果是 0  但console.log 这个对象,可以看到_x _y 的坐标   请问如何获取到这个被布局后的x y坐标呀? 附件 : --> 2019-07-01 添加评论 免费帖 --> 分享 ...

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

244. 关于event中只读属性touches,问题,求解 [ 72%]

...txt); } private function onFunc(e:Event):void { var arr:Array = e.touches; console.log("e.touchId="+e.touchId); console.log("arr[0]"+arr[0]); } } }  输出为:       不明白touches属性数组里面存储的什么类型的数据,第二个不明白touches如何使用     求解答 附件 ...

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

245. 缓动-时间线 [ 72%]

...lete); this.timeLine.on(Event.LABEL, this, this.onLabel); } onComplete() { console.log("timeLine complete!!!!"); } onLabel(label) { console.log("LabelName:" + label); } keyDown(e) { const Keyboard = Laya.Keyboard; switch(e.keyCode) { case Keyboard.LEFT: this.timeLine.play("turnLeft"); break; case Ke...

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

246. clearRes好像没作用,或许我的用法不对 [ 71%]

...Laya.Event) {         if (e.keyCode == 65) {//A             console.log("释放资源false")             Laya.loader.clearRes("res/atlas/comp.json", false);             Laya.loader.clearRes("res/atlas/comp.png", false);         }         if (e.keyCode == ...

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

247. 如何在项目中加载ttf字体? [ 71%]

...plete_FontLoad),null,Laya.Loader.BUFFER); function OnComplete_FontLoad() { console.log("加载字体"); var newFont = Laya.loader.getRes("font/本墨竟圆-常规.ttf"); if(Laya.Browser.window.conch) { console.log("12313131313"); Laya.Browser.window.conch.setFontFaceFromBuffer("本墨竟圆-常规",...

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

248. 微信小游戏截图问题 [ 71%]

...this.ctx.graphics.drawTexture(htmlC, 0, 0,this.ctx.width,this.ctx.height); console.log(htmlC) console.log(htmlC.getPixels(0,0,this.ctx.width,this.ctx.height)) 能搞定图片和texttrue,或者转化Uint8Array了,可是能怎么用啊?怎么转URL,保存到后台啊?   2019-11-24 1 条评论...

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

249. rigidBody.applyForce 物体不会移动 [ 71%]

....MeshSprite3D = building.getChildByName( "fence15" ) as Laya.MeshSprite3D; console.log("-----"); console.log(building); console.log("-----"); console.log(moveArea); } private playRun(): void { this.animator.play("Running"); this.animator.speed = 1.0; } private playIdle(): void { this.animator.play("...

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

250. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 71%]

...ect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEvent.offsetY ); }   我设置了一个矩形,并给这个矩形增加了一个点击事件。 我发现e.nativeEvent.offsetX和e.nativeEvent.offsetY返回相对...

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