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

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

71. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 75%]

...谢谢?   const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日...

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

72. 在 tiledmap 插入一个精灵在上面 [ 74%]

...vate tiledMap: Laya.TiledMap; private sp:Laya.Sprite;   constructor(){   console.info("start");   this.init(); } init():void{   Laya.init(800, 700, Laya.WebGL);   Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); }   onLoaded(){   conso...

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

73. 载入场景报错 [ 74%]

...nH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; console.log("load"); Laya.loader.create("TestScene/TestScene.ls", Laya.Handler.create(this, this.LoadSceneComplete)); } LoadSceneComplete() { console.log("finish") let scene: Laya.Scene = Laya.loader.getRes("TestScene/TestSce...

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

74. zip更新模式缓存是怎么读取的?? [ 74%]

... onEvent('downloadOK'); //let md5 = calcmd5(fs_readFileSync(localfile)); //console.log('md5='+md5); let zip = new ZipFile(); if(zip.setSrc(localfile)){ zip.forEach((id,name,dir,sz)=>{ if(!dir){ let buf = zip.readFile(id); //console.log("update "+name); let fid = window.appcache.hashstr('/'+name);...

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

75. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 74%]

...ish.y = 200 this.addChild(_fish); Laya.timer.loop(100, this, function () { console.log(_fish.x, _fish.y, _fish.width, _fish.height, _fish.rotation); if (_fish.hitTestPoint(_fish.x, _fish.y)) { console.log("hittttttt"); } }); } } //程序入口 Laya.init(600, 400); this.onLoaded() function onLoaded()...

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

76. 新手引导 挖洞 不用 cacheAs="bitmap" 希望能帮助那些和我一样有需求的码农!你好我好大家好才是真的好!请各位大佬批评指教! [ 74%]

...         var pixelRatio = Laya.Browser.pixelRatio;         console.log(browserWidth + " " + browserHeight + " " + pixelRatio);          // 获取canvas元素对应的DOM对象         var canvas = document.getElementById('canvas');         var div1 = document...

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

77. [LayaAir3]V3.2 | 调试结果不一致,导致无法判断结果? [ 74%]

...  onStart() {     //@ts-ignore     window.camera = this.camera;     console.log("Game start", this.camera._up);     console.log(       "Game start",       this.camera._up.x,       this.camera._up.y,       this.camera._up.z     );   } } 附件 : --> testProject.zip 2024-10-29 ...

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

78. laya air 调试的输出有没有办法存成一个文件 [ 74%]

...来自: layaair ide mac版本的ide  不支持copy 还有能不能支持console.trace,在chrome是支持的,在mac版本 laya air 不支持   2016-07-29 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 xiqingdubu 相关问题 两个...

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

79. HIERARCHY_LOADED 和 LOADED有什么区别?为什么对scene不起作用 [ 74%]

...cene()); scene.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { console.log("scene HIERARCHY_LOADED"); }); scene.once(Laya.Event.LOADED, null, function (sprite) { console.log("scene LOADED"); });HIERARCHY_LOADED 和 LOADED有什么区别?为什么对scene不起作用? 2017-06-19 添...

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

80. 截屏文件没有保存 [ 73%]

...程是:https://ldc.layabox.com/doc/?nav=zh-js-7-2-7 if( window.conch ) { console.log("i'm here 1"); window.conch.captureScreen(function(arrayBuff,width,height){ conch.saveAsPng(arrayBuff,width,height,conch.getCachePath()+"/test.png" ); console.log("i'm here 2:" + arrayBuff.byteLength + " " + width +...

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