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

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

1. UI界面发布后的layaUI.max.all.ts文件里的函数认识 [ 100%]

UI界面发布后的layaUI.max.all.ts文件里的函数认识 constructor(){ super()}和 createChildren():void { super.createChildren(); this.createView(ui.login.HeadUI.uiView); } 是先执行constructor()再执行createChildren()吗?constructor()相当于构造函数,createChildren()是构造...

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

2. 针对2.0.0 beta5 setLoadingPage 做增强 [ 66%]

...一个场景的同时执行异步方法 */ export default class LoadPage { constructor(url = null) { this._loadScene = null if (url) this.preload(url) } /** * 预加载loading页面 * @param {String} url loading页面url */ async preload(url = 'loadingpage.scene') { if (this._loadScene && ur...

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

3. Cannot read property 'load' of null [ 62%]

...null,为什么会出现为null的情况?  代码如下: class main{ constructor(){ MapManager.getInstance().LoadMapResource(); } } new main(); class MapManager { private static s_instance = null; public static getInstance():MapManager { if(null==this.s_instance) { this.s_instance=new MapManager...

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

4. playSound和playMusic结束时候有异常抛出 [ 59%]

...emo代码(已测试有效):  // 程序入口 class GameMain {     constructor()     {         Laya.init(640,1100, Laya.WebGL);         //设置适配模式         Laya.stage.scaleMode = "showall";         //设置剧中对齐         Laya.stage.alignH = "center";   ...

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

5. replaceSlotSkinName对于spine换肤不成功 [ 59%]

...ain{ private m_skeleton : Laya.Skeleton; private m_templet : Laya.Templet; constructor() { Laya.init(1334,750,Laya.WebGL); this.m_templet = new Laya.Templet(); this.m_templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.m_templet.on(Laya.Event.ERROR,this,this.onError); this.m_templet.load...

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

6. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 52%]

...我看一下 xdkaka • 2017-12-13 17:03 没办法发图了 class Main { constructor() { Laya.init(480, 852); Laya.stage.scaleMode = "showall"; Laya.stage.alignV = 'middle'; Laya.stage.alignH = 'center'; Laya.stage.screenMode = "vertical"; Laya.stage.bgColor = "#101825"...

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

7. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 44%]

...inTex : number; public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName...

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

8. socket大型项目回调 [ 23%]

...te reqId:number = 0; private _package:IPackage; private _message:IMessage; constructor(){ if(!console.group){ console.group = console.log; console.groupEnd = function(){console.log("----")}; console.info = console.log; console.warn = console.log; console.error = console.log; } this._message = new Me...

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