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

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

1. 扩展脚本问题,麻烦帮看下 [ 100%]

扩展脚本问题,麻烦帮看下  module game { export class testbox extends Laya.Box { constructor(){ super(); console.log(this.getChildByName('btnName')) } } export class testImg extends Laya.Image { constructor(){ super(); console.log(this.getChildByName('name')) console.log(this) } } } 我...

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

2. 如何使用TS的命名空间(namespace)? [ 99%]

...ts文件,在文件内创建namespace,如下: namespace MyNamespace { export class MyClass { // TODO. } }在main.ts的构造函数中,总是报错,提示 MyNamespace is not defined, 但是,如果我不用新文件,把这段定义放在main.ts内,就不会报错,请问如何引用...

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

3. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 98%]

...og; import Scene=Laya.Scene; var REG: Function = Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public tipLbll:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren...

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

4. layaMaxUI.js export ui bug (影响编译) [ 94%]

layaMaxUI.js export ui bug (影响编译) [20:22:28] Error: Export 'ui' is not defined at error (D:\LayaAirIDE\resources\app\node_modules\rollup\dist\rollup.js:9402:30) at Module.error (D:\LayaAirIDE\resources\app\node_modules\rollup\dist\rollup.js:13340:9) at tryParse (D:\LayaAirIDE\resources\app\...

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

5. 2.0 Beta3版本中,runtime脚本的的问题 [ 94%]

...import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; export module ui { export class BGPageUI extends View { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("BGPage"); } } export class MonkeyPageUI extends View { constructor(){ super()} cr...

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

6. ts项目 模块问题 [ 94%]

...s项目 模块问题 b文件写了个class ,怎么在a文件new classexport 显示未定义,require也用不了   //b文件 export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this._...

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

7. module写法的模块无法使用,其他地方使用会报错 [ 92%]

...dule写法的模块无法使用,其他地方使用会报错 module bili{ export class Test{ constructor(){ console.log("Test"); } } } 2018-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 7 个回复 牛唠叨 赞同来...

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

8. LayaAir2.0的GameConfig.ts [ 91%]

...}的书写方式 : module app{ /** * 登录加载界面 * @author Husz */ export class LoadingView extends Laya.View implements small_lib.ILoadingView那么在GameConfig将会报错 , 因为会自动刷新.  除非采用 , 如下: /** * 登录加载界面 * @author Husz */ export default class Loa...

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

9. 关于位图字体使用问题,参照官方文档,显示不出 [ 90%]

关于位图字体使用问题,参照官方文档,显示不出 export default class AllText extends ui.examples.text.BitmapFontUI   ui.examples.text.BitmapFontUI 找不到继承的类   laya is not define   参见 demo 附件 : --> Test1.rar 2020-11-29 添加评论 免费帖 --> 分享 微博 ...

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

10. 分享:关于自定义场景继承的实现 [ 90%]

... VSCode里script/base下新建BaseScene.ts,继承Laya.Scene BaseScene.tsexport namespace base{ export class BaseScene extends Laya.Scene{ constructor(){ super(); console.log('BaseScene:我是基类BaseScene,我的子类是导出类,我的父类是场景类'); } } } 导出UI 导出后layaMaxUI.ts...

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