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

大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0051 秒)

31. 获取sprite对象的 width和height为0 [ 81%]

获取sprite对象的 width和height为0  /** * 船 */ class Boat extends Laya.Sprite { private bt:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 ...

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

32. 升级引擎到1.7.19.1beta List报错问题 [ 81%]

... Calvin 赞同来自: 可以证实的,有如下场景: class PageList extends laya.ui.List {        constructor()      {           super();       }        protected initialize():void        {              super.initialize();              this.itemRender = Pa...

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

33. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 80%]

...对象 const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2...

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

34. "Utils3D:unidentified class type in (.lh) file." [ 80%]

...nd class laya.ani.bone.Skeleton Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent 脚本重命名后报Uncaught Can not find class 错误 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'new' 关于js继承类class的参数问题 Uncaught C...

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

35. 2.0 Beta3版本中,runtime脚本的的问题 [ 80%]

....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()} createChildren():void { super.createChildre...

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

36. 问一个问题就是你们的每个UI都继承了一个引擎的代码我要写一个UI的基类那不就无法继承了 [ 80%]

...如果是面板本身绑定runtime并没有用,导出的UI类依然还是extends View,依然还是调用不到基类的函数;会报错:“xxx this variable is not defined”;并且在源码中看到“/*no*/this.xxx()”   最头痛的是自己把extends View改为extends自己写的基...

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

37. Laya.class是什么意思 [ 80%]

... 赞同来自: Laya.class是js下的继承类的用法,相当于as3下的extends的用法 2016-07-14 0 5 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Pacino 相关问题 在js代码中,let 是什么意思 看官方2.0的shader例子,...

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

38. must set Document Class 是怎么回事? [ 80%]

...nd class laya.ani.bone.Skeleton Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught TypeError: Class constructor Component cannot be invoked without 'new' 做微信开放域遇到Uncaught Can not find class laya.ui.WXOpenDataViewer 做微信开放域遇到Uncaught Can...

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

39. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

...。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any&gt...

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

40. 微信飞机大战中“开始页面”逻辑功能关于js继承问题 [ 79%]

...实现”的“开始页面”这一步的时候,AS新建了GameStart并 extends GameStartUI,然后直接用this改按钮的状态; 问题: 我用JS的时候找了下用class可以实现extends的效果,但不知道怎么写,就是改变不了按钮的状态,请问这块用JS要怎么...

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