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

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

21. 请问UI之间的场景切换要怎么写 [ 89%]

...s.btn_wxsign.on(Laya.Event.CLICK,this,this.onWxSign); this.reset(); } Laya.class(sg_sign,"sg_sign",_super); var _proto = sg_sign.prototype; _proto.reset = function(){ Laya.SoundManager.playMusic('res/sound/sign_bgm.mp3',0); } _proto.onWxSign = function(e){ onWxSign1(); } return sg_sign; })(ui.sg_sig...

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

22. event自定义事件的问题 [ 89%]

...是testDemo LayaSample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public function LayaSample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisEvent(); } } } R...

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

23. layaflash下构造函数需要注意哪些问题? [ 88%]

...为父类A.as的代码:package { import flash.display.Sprite; public class A extends Sprite { protected var data:String = "layabox"; public function A() { super(); } } }   作为子类B.as的代码:package { public class B extends A { public function B() { this.data = "layaFlash";//这里的...

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

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

...BaseScene.ts,继承Laya.Scene BaseScene.tsexport namespace base{ export class BaseScene extends Laya.Scene{ constructor(){ super(); console.log('BaseScene:我是基类BaseScene,我的子类是导出类,我的父类是场景类'); } } } 导出UI 导出后layaMaxUI.ts的内容如下/**This class i...

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

25. 续飞机大战 [ 86%]

...s.addChild(this.bg2); //创建一个帧循环,更新容器位置 }; Laya.class(BackGround,"BackGround",_super); return BackGround; }(Laya.Sprite));注意: 1、如果_super是传参过来的,直接写_super.call(this)即可,如果不是直接写BackGround.__super(this)即可,两种写法(...

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

26. js继承模式 [ 86%]

js继承模式     new function() { var className = 'BackGround'; window[className] = (function() { Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var _...

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

27. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 86%]

...类中没有声明场景中的Button等控件? export module ui { export class GameSceneuiUI extends Laya.Scene { public static uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart","...

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

28. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 86%]

...声明场景中的Button等控件? export module ui {     export class GameSceneuiUI extends Laya.Scene {         public static  uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button...

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

29. 构造函数的__super.call(this)以及调用基类方法的laya.ui.Component.prototype.onCompResize.call(this);在2.0是怎么写的 [ 85%]

...有通过一个类的名字(字符串)来获取该类的方法?类似get class by name 问题状态 最新活动: 2019-03-22 17:48 浏览: 810 关注: 1 人

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

30. 1.7.3之后的版本,重复类名出现bug [ 84%]

...下。编译器编译出来,命名的时候都是错乱的 比如: __class(StartUpCommand,'com.game.modules.hall.controller.StartUpCommand',_super); __class(StartUpCommand,'com.game.modules.login.controller.StartUpCommand',_super,'StartUpCommand$1'); __class(StartUpCommand,'com.game.shell.contro...

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