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

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

51. untiy导出的粒子特效有播放完成的回掉吗? [ 82%]

....Sprite3D.load(url); this.m_Effect.on(Laya.Event.PLAYED, this, function(){ console.log("PLAYED callback!!"); }) this.m_Effect.on(Laya.Event.PAUSED, this, function(){ console.log("PAUSED callback!!"); }) this.m_Effect.on(Laya.Event.COMPLETE, this, function(){ console.log("COM...

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

52. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 82%]

...s.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya.stage.mouseX, Laya.stage.mouseY); // console.log("移动的点集合" + this.path); thi...

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

53. 我用laya.websocket通信 二进制数据, 服务器对二进制数据进行解析,解析出来不是预期,请问我哪里写错了? 代码如下 [ 82%]

...tr = new String("大家好,这是websocket通信!");             console.log("str.length*2:" + str.length*2);             var b = new ArrayBuffer(20 + str.length*2);             var dv = new DataView(b, 0);             dv.setUint16(0, str.length*2, false);           ...

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

54. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 82%]

...tageHeight = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE...

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

55. async bug 导出小游戏 [ 81%]

...rmal; share.imageUrl = ShareImgUrl; let a = await share.shareAppMessage(); console.log(a) }   转换后代码   onShareClick() { // return __awaiter(this, void 0, void 0, function* () { // let share = SDKCenter.getShare(); // share.title = ShareNormal; // share.imageUrl = ShareImgUrl; // let a = y...

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

56. socket通讯返回数据 [ 81%]

...# } private openHandler(event: any = null): void { //正确建立连接; console.log("建立连接");//***************************************************************************不写出 console.log(event); } private receiveHandler(msg: any = null): void { ///接收到数据触发函数 console.l...

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

57. 在线急等,发现你们这个编译器一个bug,不能实现负负得正,昨天明明解决了,过了一会又不行了,怎么回事 [ 81%]

...moveDownBall = function(){ this.ball.x -= this.vx; this.ball.y += this.vy; console.log("111111"); this.vy *= 0.99; this.vy += 0.25; console.log("222222"); if (this.ball.y + this.vy >= this.img1 ||this.ball.y + this.vy <= 0) { this.vy = -this.vy; console.log("33333"); } if (this.ball.x + this.v...

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

58. list item 添加事件后无法监听 [ 81%]

...Item);     return list; }  function updateItem(cell, index) {     console.log(index);     // console.log(cell.dataSource);     cell.setImg(cell.dataSource[index]);     cell.on(Laya.Event.CLICK, function() {         console.log("click")     }) }  function onSelect(in...

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

59. 游戏铺满固定大小容器,火狐和谷歌正常,edge会有滚动条? [ 81%]

...Laya.Browser.clientHeight){                         console.log("横屏",this.lastClientWidth);                         if(Laya.stage.scaleMode != Laya.Stage.SCALE_SHOWALL){                             Laya.stage.scaleMode = La...

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

60. 【经验分享】如何让ts项目支持装饰器语法,以及自动化发布相关的一些东西 [ 81%]

...d, { silent: true, shell: true, }); _gulp.stdout.on('data', (data) => { console.log(`${data}`); }); _gulp.stderr.on('data', (data) => { console.log(`${data}`); }); _gulp.on('close', (code) => { console.log(`exit:${code}`); });   b)、创建并编写脚本 tools-publish.js#!/usr/bin/env n...

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