大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0051 秒)
获取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
... Calvin 赞同来自: 可以证实的,有如下场景: class PageList extends laya.ui.List { constructor() { super(); } protected initialize():void { super.initialize(); this.itemRender = Pa...
来源: Laya_社区 发布时间: 20180810
...对象 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
...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
....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
...如果是面板本身绑定runtime并没有用,导出的UI类依然还是extends View,依然还是调用不到基类的函数;会报错:“xxx this variable is not defined”;并且在源码中看到“/*no*/this.xxx()” 最头痛的是自己把extends View改为extends自己写的基...
来源: Laya_社区 发布时间: 20170812
... 赞同来自: Laya.class是js下的继承类的用法,相当于as3下的extends的用法 2016-07-14 0 5 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Pacino 相关问题 在js代码中,let 是什么意思 看官方2.0的shader例子,...
来源: Laya_社区 发布时间: 20160714
...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
...。 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>...
来源: Laya3.0_文档 发布时间: 20251010
...实现”的“开始页面”这一步的时候,AS新建了GameStart并 extends GameStartUI,然后直接用this改按钮的状态; 问题: 我用JS的时候找了下用class可以实现extends的效果,但不知道怎么写,就是改变不了按钮的状态,请问这块用JS要怎么...
来源: Laya_社区 发布时间: 20171123