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

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

11. TypeScript语法问题,泛型 [ 93%]

...但是写了很多遍没成功,有人会吗?下面是C#代码 public class Class1<T> where T : class, new() { private static T instance; public static T GetInstence() { if (null == instance) { instance = new T(); } return instance; } } 这样我在其他地方,继承Class1,就可以直...

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

12. Warning!,this class[MiniAdpter] already exist: Object {} [ 93%]

Warning!,this class[MiniAdpter] already exist: Object {} Warning!,this class[MiniAdpter] already exist: Object {} 出现异常,代码无法正常运行 2018-09-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 ...

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

13. UI-List [ 89%]

...项目开发更高效。const WID = 373, HEI = 85; const Box = Laya.Box; class Item extends Box { constructor(){ super(); const Image = Laya.Image; this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); } setImg(src) { this.img.skin = src; } } class UI_List { constructor() { const Bro...

来源: Laya2.0_示例 发布时间: 20241001

14. Arial Black字体能显示,为啥游戏里在firefox 里字体显示成了Times New Roman了 [ 89%]

...: #583823;font-size: 25px} </style> </head> <body> <p class="p1">Arial bold Your Score:8000</p> <p class="p2">Times New Roman Your Score:8000</p> <p class="p3">Arial Black Your Score:8000</p> <p class="p4">Arial Your Score:8000</p>  ...

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

15. ts项目 模块问题 [ 89%]

ts项目 模块问题 b文件写了个class ,怎么在a文件new class? export 显示未定义,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

16. 关于页面跳转的困惑,class初始化和释放的问题。 [ 89%]

关于页面跳转的困惑,class初始化和释放的问题。 我是这样实现页面跳转的 var b = new B()  然后stage.addChild(b) ,这时候UI从A切换到了B   然后 var a = new A() 然后 stage.addChild(a) ,这时候UI从B切换到A   以上实现UI页面的跳转,但是发...

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

17. 继承Scene没有onEnable [ 88%]

... Laya.Scene.root.addChild(t);     } } //激活启动类 new Main();  class tt extends Laya.Node{     constructor(){         super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let...

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

18. must set document class! [ 88%]

must set document class! 编译时出来的一个弹框。没有更多提示。 2018-07-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Laya_Aaron 赞同来自: 需要设置启动类 2018-07-06 0 0 分享 微...

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

19. 区块地图-PerspectiveWall [ 88%]

...ript、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class TiledMap_PerspectiveWall { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(700, 500, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDD...

来源: Laya2.0_示例 发布时间: 20241001

20. 区块地图-带动画的地图 [ 87%]

...ript、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class TiledMap_AnimationTile { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(1100, 800, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDL...

来源: Laya2.0_示例 发布时间: 20241001