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

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

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

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

22. 复杂UI类卸载 [ 76%]

复杂UI类卸载 class GameUI extends View{ container:Laya.Sprite; img1:Laya.Image; anim1:Laya.Animation; ... }, 类似这样的复杂UI类,里面包含了各种类型的组件,当需要卸载GameUI类的时候,gameUI.removeSelf();gameUI.destroy(true);gameUI = null ,用这种方式是否可行...

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

23. 发现bug,update大问题!!!!!!!!! 2.13版本 [ 74%]

...t"; import UIMain from "../ui/Game/UIMain";  export default class GameWnd extends BaseWin {     public view: UIMain;     /** 角色 */     private character: Laya.Sprite     /** 角色刚体*/     private rig: Laya.RigidBody     /** 医疗包*/     private addhp: Laya.Sprite     /**...

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

24. 动效问题,没有 ui.TestPUI,官方文档是错的,几年了至今无解答 [ 73%]

...Laya.Scene; var REG = Laya.ClassUtils.regClass; export class kick_effectUI extends EffectAnimation { //然后又改成Laya.EffectAnimation constructor(){ super(); this.ani1=null; this.effectData =ui.kick_effectUI.uiView;; } } kick_effectUI.uiView={"type":"View","props":{},"compId":2,"child":[{"type"...

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

25. 在UI类里调用启动类的静态函数失败了 [ 71%]

...?   /**Created by the LayaAirIDE*/ module view { export class GameInfo extends ui.GameInfoUI { constructor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KE...

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

26. layaMaxUI.ts的自动生成代码bug [ 71%]

...on = Laya.ClassUtils.regClass; export module ui { export class MainSceneUI extends Laya.SceneBase { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("MainScene"); } } REG("ui.MainSceneUI",MainSceneUI); } 期待生成SceneBase, 结果仍然生成Laya.SceneBase  ...

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

27. TS版分包报错 [ 70%]

...类似如下代码: module ui.coreUI {         export class TestUI extends View{         // do something...         } }       我在其它包的类中通过 import TestUI = ui.coreUI.TestUI ;  方式引入类 定义时报错:  "Uncaught ReferenceError: ui is not defined"    ...

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

28. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 70%]

... const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; con...

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

29. UI运行时 · LayaAir3.0文档 · LAYABOX [ 69%]

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

30. 创建laya的视图销毁destroy()清除不了 [ 69%]

...不了 创建laya的视图销毁destroy()清除不了。  class Mail2View extends laya.display.Sprite { private display:ui.mail.mail2UI; constructor(){ super(); this.display = new ui.mail.mail2UI(); this.addChild(this.display); } public destroy():void { this.display.destroy(); this.display.removeSe...

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