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

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

11. UI运行时 · LayaAir3.0文档 · LAYABOX [ 89%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...

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

12. 2.0 beta UI Button无法获取 [ 88%]

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

13. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 87%]

...} 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_文档 发布时间: 20231129

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

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

15. 列表组件 · LayaAir3.0文档 · LAYABOX [ 86%]

...。 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_文档 发布时间: 20230927

16. 分包后, 资源加载问题 [ 85%]

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

17. 关于.ui文件生成的ts类如何正确使用这个.ui皮肤,自动生成的代码有误 [ 85%]

...的界面,比如我写了A.ui文件,自动生成一个ts类,class A extends ui.AUI,但是这个ui命名空间并不存在,如果我手动改成extends Laya.View(.ui文件里用的View标签),那么我如何让这个类去使用这个.ui文件呢?就像eui里指定skin一样。 2018-0...

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

18. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 84%]

...添加事件报错 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

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

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

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

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

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

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