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

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

41. 新手,图片加载不进去,没有报错。很疑问 [ 81%]

...链接 提交 1 个回复 Laya_XS 赞同来自: var BackGround=(function(_super){ function BackGround(){ BackGround.__super.call(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("comp/bg.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.S...

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

42. 不能成功调用 DiaLog Close 关闭方法 [ 81%]

...用 DiaLog Close 关闭方法 /** * Start 界面 */ var Start = (function(_super){ function Start(){ Start.super(this); // 注册点击开始事件 this.beginBtn.on(Laya.Event.CLICK,this,this.onBeginClick); // 注册跳转事件 this.linkMsleanBtn.on(Laya.Event.CLICK,this,this.onLinkClick); // 初...

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

43. 新手学js做开发,写了一个按钮,点击没有反应 [ 81%]

...关的书籍   完整的结构如下所示: var LoginView = (function(_super){     function LoginView(){         LoginView.super(this);     }     Laya.class(LoginView,"LoginView",_super);     return LoginView; })(ui.LoginUI);   2018-01-30 0 0 分享 微博 QZONE 微信 sky_sum...

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

44. 关于js继承类class的参数问题 [ 81%]

... 1 个回复 w1114367261 赞同来自:  * @example      * (function (_super){      *     function Item(){      *         Item.__super.call(this);//初始化父类      *         this.graphics.drawRect(0, 0, 100, 20, "#ff0000");      *         var label = new laya.ui.Lab...

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

45. 关于TS get/set重写问题 [ 81%]

...后子类B重写 public set a($value:number):void {     this.aa();    super.a = $value;  } private aa():void{}   但是super是不能用到set/get中的,所以报错了,如果用this替代super,那就死循环肯定不行 然后我看到Laya有提供个方法 Laya.superSet和Laya.superGet  ...

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

46. 继承Scene没有onEnable [ 81%]

...in();  class tt extends Laya.Node{     constructor(){         super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let t = new tt();         Laya.Scene.root.addChild(t);    ...

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

47. socket无法连接服务器 [ 80%]

...的回调             if (this.connected) return;             super.connect(IP, PORT);         }         ////////////////////////////////////         protected _onOpen(...args: any[]): void {             super._onOpen(args);             this.state_ = EConnectionSt...

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

48. 官方的示例贴上来,怎么没反映啊 [ 80%]

官方的示例贴上来,怎么没反映啊 var JiHuo = (function (_super) { function JiHuo() { JiHuo.super(this); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(...

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

49. 关于3d项目中component的问题 [ 80%]

...ertTranslate = new Laya.Vector3(0, 0, 0); function CmpScript() { CmpScript.super(this); this.x = 0; } Laya.class(CmpScript, "CmpScript", Laya.Script) CmpScript.prototype._initialize = function (owner) { var _this = this; CmpScript.__super.prototype._initialize.call(this, owner); } CmpScript.prototyp...

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

50. event自定义事件的问题 [ 80%]

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

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