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

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

1461. 微信小游戏报错 the .lh file root type must be Scene [ 42%]

...ring = "res/layaScene/xiangsuqiche.ls"; public LoadScene3D(): Laya.Scene { console.log("screen#DPath = " + this.screen3DPath); let scene: Laya.Scene = Laya.Scene.load(this.screen3DPath); Laya.stage.addChildAt(scene, 0); this.InitCamera(scene); return scene; } 微信小游戏报错 Scene: the .lh fil...

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

1462. 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 [ 42%]

....aa.shuchu();//输出这个组件num,结果为2,是LayaSample.bb的num console.info(s); }, 1000); } } class Child{ private _num:string; public num(n:string){ this._num = n; } public shuchu(){ return this._num; } } new LayaSample(); 2018-08-05 3 0 分享 微博 QZONE 微信 手撕腊鸭 赞同来...

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

1463. 自定义场景继承导出,会在自定义类中加入Laya.前缀导致layaMaxUI文件报错 [ 42%]

.../layaMaxUI.ts"     let fileContent = readFile(layaMaxUI_Path);     console.log("读取文件",fileContent)     if (fileContent ) {             fileContent = fileContent.replace(/Laya\.UICodeView/g,"UICodeView");             fs.writeFileSync(layaMaxUI_Path, fileCon...

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

1464. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 42%]

...ource.value; // cell.setImg(cell.dataSource); } function onSelect(index) { console.log("当前选择的索引:" + index); } })();这段代码直接复制到官网的例子里面执行就能看到了,最新版本引擎中,在renderHandler中强制设置TextInput的值,不会出现数据乱的...

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

1465. 使用UI组件tree时,添加的数据结构必须是xml吗?添加xml时对于tree的单元格里面的label如何控制例如visible的属性 [ 42%]

...;/dir>"+ "</data>"; var xml = this.parseXMLFromString(xmlString); console.log(this.m_tree) this.m_tree.xml =xml; 2017-07-17 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 这里以alpha,官方tree示例为例,你可以参考下 1、在xml里,给你的项添加一个关于alph...

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

1466. 模型与动画的导入使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...e { private _animator: Laya.Animator; private _isRun: boolean; onAwake() { console.log("Game start"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animat...

来源: Laya3.0_文档 发布时间: 20240910

1467. Resources already exist,is repeated loading 加载特效报重复加载 [ 42%]

...is, this.onComplete));         //this.onComplete()         console.log("11111111111")         Laya.loader.load("res/threeDimen/particle/2d.lh", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON);     }      public onAssetsLoaded(settings: ParticleSetting): ...

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

1468. Laya2.6、2.7等支持async、await编译经验分享 [ 41%]

...urn new Promise((resolve,reject)=>{ Laya.timer.once(10000,this,()=>{ console.log("10s后") resolve() }) }) }  如果有什么问题,欢迎大家一起来分享感恩。 附件 : --> regenerator.runtime_.zip 2020-07-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

1469. 真机调试 开启子域后 提示出现window is not defined [ 41%]

...工程 bt_rank_call_back(body){   this.bt_rank.CALL_BACK = function () { console.log("排行榜") var player_rank = body.wxData.get_canvas_4_code("SHOW_PLAYER_RANK",0) var rankTexture = new Laya.Texture(sharedCanvas); rankTexture.bitmap.alwaysChange = true; var pl = new Laya.Sprite() pl.graphics.dr...

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

1470. [临时解决]bug?加载sk问题 [ 41%]

...rototype;      _proto.preload = function (complete) {         console.log("preload..." + (++this.numPreloadCalls));          if (this.dragon_sk._templet) {             complete();         } else {             Laya.timer.frameOnce(1, this, this.pr...

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