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

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

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

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

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

12. LayaAir2.0的GameConfig.ts [ 89%]

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

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

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

关于位图字体使用问题,参照官方文档,显示不出 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

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

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

15. 请问2.0的版本开始,我用ts编写的相关内容,都要使用import和export吗? [ 88%]

...2.0的版本开始,我用ts编写的相关内容,都要使用import和export吗? 我用的版本是LayaAirIDE2.0 beta5.1, 看文档和示例工程,现在是使用gulp + browerify构建的样子, 用ts写的话,最终ts会被编译成一份bundle.js,有点类似1.0的code.js的意思  ...

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

16. 视频节点 · LayaAir3.0文档 · LAYABOX [ 87%]

...脚本控制VideoNode: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.VideoNode }) public video: Laya.VideoNode; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法...

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

17. UI滤镜效果 · LayaAir3.0文档 · LAYABOX [ 87%]

...,示例代码如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { // 获得Image组件 @property({ type: Laya.Image }) public img: Laya.Image; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 on...

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

18. 程序蓝图 · LayaAir3.0文档 · LAYABOX [ 86%]

...; @bpClass({ name:"TestBluePrint", canInherited: true, extends:"Script" }) export class TestBluePrint extends Laya.Script { } 需要注意的是,只有注册了构造函数,才可以在蓝图编辑器的createNew中创建这个类的实例,如图12-1所示。 const { bpClass } = BP; @bpClass({...

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

19. laya 2.0 可以支持 typescript namespace 吗 [ 86%]

...,实际 namespace 可以这么写的;// 文件1 a.ts namespace game { export class A { } } export = game; // 文件2 b.ts namespace game { export class B { } } export = game; // 文件3 c.ts import * as game from "./a.ts" import * as game2 from ".b.ts new game.A() new game2.B() // 文件4 d.ts i...

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

20. __class is not defined [ 85%]

...D.runtime.js后报enum_btConstraintParams_BT_CONSTRAINT_ERP is not defined exports is not defined (js篇) Warning!,this class[MiniAdpter] already exist: Object {init: } 打包出来 code.js报错 laya is not defined 在android studio上运行ConchJNI.RunJS("JaveCallback.onHide()"),提示JaveCallba...

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