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

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

781. localStorage如何判定其是否存在 [ 71%]

...tItem("gameid")){ } 这样写会报错 Cannot read property 'getItem' of null 会导致程序终止,我想在程序开始的时候进行一次判定,根据其gameid是否存在进行后续的逻辑判断 2017-05-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

782. 跟着老师打地鼠游戏写的代码,JS为什么会出错 [ 71%]

...ui.GameUI) var GameUI=(function(_super){ function GameUI(){ this.btn_start=null; this.audio=null; GameUI.__super.call(this); } CLASS$(GameUI,'ui.GameUI',_super); var __proto__=GameUI.prototype; var Mole=(function(){ function Mole(btn_start){ alert(1) }; })() 2018-05-04 添加评论 免费帖 --> 分...

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

783. 这个写法是什么意思,能否解释一下,谢谢 [ 71%]

...on BackGround() {         //定义背景1         this.bg1 = null;         //定义背景2         this.bg2 = null;         //初始化父类         BackGround.__super.call(this);         this.init();     }     //注册类 BackGround     Lay...

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

784. Texture自动恢复还是存在另外的问题 [ 71%]

...                _$this._bitmap=bitmap;             }),null,"htmlimage",1,false,null,true);         }     }   Laya.loader.load的cache参数为什么设置为false,这会导致加载同一个图片n次,导致GPU内存增加n-1倍   为啥必须上传附件才能提...

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

785. as3用flashdevelop编译加载不了图片 [ 71%]

...D:/My_HTML5_Project/AS3/project/LoadImage/bin/h5/comp/a1.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access. 好像是说不允许加载,请问怎么解决? 虽然IDE可以加载图片成功,但还是习惯用FD编译,而...

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

786. 对象mask的区域改变问题! [ 71%]

...ivate setValue(v:number):void{ this.__mask.scaleX = v; this.img_bar.mask = null;//第二次设置mask的时候必须给原对象的mask置空,否则无效 this.img_bar.mask = this.__mask; this.label_pro.text = v * 100 + "%"; }对象mask的局域(比如scaleX)改变时,必须把该对象的mask...

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

787. laya.ani.swf.MovieClip_API3.0 [ 71%]

... MovieClip 实例。 Parameters Default value parentMovieClip: MovieClip = null 父MovieClip,自己创建时不需要传该参数 Returns MovieClip Properties Optional _extra _extra: INodeExtra Inherited from Node._extra Defined in laya/display/Node.ts:56 _ownGraphics _ownGraphics: boolean = false I...

来源: Laya3.0_api 发布时间: 20231115

788. laya2.0 localStorage语法错误 [ 71%]

...getItem=function(key){ return Storage.support ? Storage.items.getItem(key):null; } Storage.getJSON=function(key){ return JSON.parse(Storage.support ? Storage.items.getItem(key):null); }?:不是js的写法吧... 2018-11-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果...

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

789. AnimationBase和MovieClip removeLabel问题反馈 [ 71%]

...标签! */ __proto.removeLabel=function(label){ if (!label)this._labels=null; else if (this._labels){ for (var name in this._labels){ this._removeLabelFromList(this._labels[name],label); if(this._labels[name].length == 0){ delete this._labels[name]; } } } } ----------------------------------------...

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

790. TypeScript 泛形方法如何传TYPE? [ 71%]

...ator = node._childs[index].getComponentByType(Laya.Animator); if (element!=null) { return element; }else this.GetComponetInChild(node._childs[index],);   } } 如何写成泛型方法呢???编译不通过 GetComponetInChild<T>(node:laya.display.Node):T { // var s:=typeof(Laya.Animator); for ...

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