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

大约有 168 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0055 秒)

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

42. 【简单跑酷--JS版】---Lv.6 终篇 [ 86%]

...实现两个能量条的功能,我们创建一个Hp.js  代码如下  (function () { /** * 血条 * */ function Hp(type){ //背景 this.bg = null; //进度条 this.bar = null; //最小值 this.MIN_VALUE = 0; //最大值 this.MAX_VALUE = 100; //值 this.value = 100; Hp.__super.call(this); this.in...

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

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

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

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

44. 使用js压缩工具报错 [ 86%]

...查看具体报错的功能。   ERROR:invalid property id   interface:function(name,_super){ Laya.__package(name,{}); var ins=Laya.__internals; var a=ins[name]=ins[name] || {self:name}; if(_super) { var supers=_super.split(','); a.extend=[]; for(var i=0;i<supers.length;i++){ var nm=supers[i]...

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

45. 有关ui的问题 [ 85%]

...接 提交 1 个回复 明天当男神 赞同来自: var TestScene = (function (_super) {     function TestScene() {         TestScene.super(this);     }     Laya.class(TestScene,"TestScene",_super);       return TestScene; }(ui.TestViewUI));   1.1创建好ui后,导出,再自己...

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

46. HTMLDIVElement设置innerHTML时报错 [ 85%]

...l.contextWidth, html.contextHeight); Laya.stage.addChild(html); setTimeout(function() { html.innerHTML = ''; }, 300);此问题是由于在新版中改变了laya.html.js的HTMLDivElement中width的set方法 之前的版本中,set方法为/** *获取对象的宽 */ __getset(0,__proto,'width',functio...

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

47. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 84%]

...有东西;当三秒后游戏结束,点重新开始,飞机才出来 function onLoaded() { start = new GameStartUI(); start.btn_start.on(Event.MOUSE_UP,this,gameInit) Laya.stage.addChild(start); } function gameInit() { map = new GameBgUI(); Laya.stage.addChild(map); play = new GamPlayUI(); Laya....

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

48. http无响应 [ 84%]

...应呢? 单独用在其它文件也是没有反应,  var LoginView = (function (_super) { function LoginView() { LoginView.super(this); //调用父类构造函数 this.dlg; } function connect() { var hr = new Laya.HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Even...

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

49. ReferenceError: Loading_fly is not defined [ 84%]

...1-07 0 0 分享 微博 QZONE 微信 apeCom 赞同来自: var Loading_fly = function (_super) { function Loading_fly() { Loading_fly.super(this); this.onPlay(); } Laya.class(Loading_fly, "Loading_fly", _super) var _proto = Loading_fly.prototype; _proto.onPlay = function () { UIConfig.popupBgAlpha = 0...

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

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

...享 微博 QZONE 微信 w1114367261 赞同来自:  * @example      * (function (_super){      *     function Item(){      *         Item.__super.call(this);//初始化父类      *         this.graphics.drawRect(0, 0, 100, 20, "#ff0000");      *         var label = new ...

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