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

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

11. 两个移动的简单物体 onTriggerEnter 无法触发 (悬赏) [ 90%]

...方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); };  onTriggerStay(other){ console.log("onTriggerStay"); };  onCollisionEnter(other){ console.log("onCollisionEnter"); };  onCollisionStay(collision){ console.log("onCollisionStay"); } } 附...

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

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

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

13. 预制体添加刚体后,和其它刚体碰撞后不能修改角度和位置 [ 89%]

...ion;         if(other.label === "heng"){             console.log("角度"+this.owner.rotation);             this.owner.rotation=180-n;             console.log("角度"+this.owner.rotation);         }          if(other.label === "shu"){...

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

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

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

15. socket无法连接服务器 [ 89%]

...         this.state_ = EConnectionState.eConnected;             console.log("conect to 127.0.0.1");         }         protected _onMessage(msg: any): void {             super._onMessage(msg);             console.log("receve msg : ");             console.log(msg); ...

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

16. LayaAir 2.0 模糊滤镜与发光滤镜找不到 [ 88%]

...LayaAir 2.0 模糊滤镜与发光滤镜找不到 我再代码里面打印: console.log(Laya.GlowFilter); console.log(Laya.ColorFilter); console.log(Laya.BlurFilter); 只ColorFilter能找到,其它都是undefine 2019-03-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没找到相关...

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

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

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

18. curmem 怎么进行销毁 [ 85%]

... var asset:Image = assets; //查看log,清理前资源一直在内存中 console.log(Laya.loader.getRes(asset)); //调用清理方法 Laya.loader.clearRes(asset); //查看log,清理后,资源被卸载 console.log(Laya.loader.getRes(asset)); sp.destroy(); 这些都测试过,没消减 curme...

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

19. 用npm的protobuf导出的ts代码。然后用import { } from "" 运行到这里没反应,不继续执行,也不报错。 [ 85%]

...{ com} from "../libs/protobuf/area.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufUtil.ProtoArea.decode(buffer); cons...

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

20. [LayaAir3]Laya.loader.loadPackage加载分包,如果判断成功与失败 [ 85%]

...Laya.loader.loadPackage("sub1111").then(() => {                 console.log('pack sub1 loaded');                 new Subpack1().init();             }, (err) => {                 console.log('pack sub1 error', err);             }); 2025-09-09 添加评论 免...

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