大约有 228 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
....Dialog; import Scene=Laya.Scene; export module ui { export class AttackUI extends View { public btn_attack:Laya.Button; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码: import { ui } from "../ui/layaMaxUI"; export default c...
来源: Laya_社区 发布时间: 20180926
...继承Laya.Scene BaseScene.tsexport namespace base{ export class BaseScene extends Laya.Scene{ constructor(){ super(); console.log('BaseScene:我是基类BaseScene,我的子类是导出类,我的父类是场景类'); } } } 导出UI 导出后layaMaxUI.ts的内容如下/**This class is automatically...
来源: Laya_社区 发布时间: 20200827
...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需要用到该Dialog的场景...
来源: Laya3.0_文档 发布时间: 20251024
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { // 获得Image组件 @property({ type: Laya.Image }) public img: Laya.Image; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //创建...
来源: Laya3.0_文档 发布时间: 20250826
...。 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
...e.log("kk22") var View=laya.ui.View; console.log("kk3") //class loading100 extends laya.display.Sprite var loading100=(function(_super){ console.log("kk4") function loading100(){ loading100.__super.call(this); this.load=new loadingUI(); this.addChild(this.load); } console.log("kk5") __class(loading1...
来源: Laya_社区 发布时间: 20170725
...的界面,比如我写了A.ui文件,自动生成一个ts类,class A extends ui.AUI,但是这个ui命名空间并不存在,如果我手动改成extends Laya.View(.ui文件里用的View标签),那么我如何让这个类去使用这个.ui文件呢?就像eui里指定skin一样。 2018-0...
来源: Laya_社区 发布时间: 20180323
...添加事件报错 cannot read property 'on' fof undefined class GameLogin extends ui.login.login_bgUI { constructor() { super(); this.btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } } //调用on的时候 直接会报Cannot...
来源: Laya_社区 发布时间: 20181207
... Calvin 赞同来自: 可以证实的,有如下场景: class PageList extends laya.ui.List { constructor() { super(); } protected initialize():void { super.initialize(); this.itemRender = Pa...
来源: Laya_社区 发布时间: 20180810
...实现”的“开始页面”这一步的时候,AS新建了GameStart并 extends GameStartUI,然后直接用this改按钮的状态; 问题: 我用JS的时候找了下用class可以实现extends的效果,但不知道怎么写,就是改变不了按钮的状态,请问这块用JS要怎么...
来源: Laya_社区 发布时间: 20171123