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

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

121. 图像组件 · LayaAir3.0文档 · LAYABOX [ 66%]

... { @property({ type: Laya.Image }) public img: Laya.Image; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.img.skin = "resources/layaAir.png";//设置皮肤 this.img.useSourceSize = true;//...

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

122. sprite.drawToCanvas绘制纹理无法释放内存资源 [ 66%]

...c function destroy():void { _ctx && _ctx.destroy(); _ctx = null; + super.destroy(); } public function get context():Context {即  WebGL.as 注释掉265,266 WebGLCanvas.as 在 destroy()函数的最后加 super.destroy(); 2018-06-20 0 1 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: webg...

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

123. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 66%]

...代码(function () { /** * 游戏入口 */ function RunGame(){ RunGame.__super.call(this); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite); //定义RunGame的prototype var _proto = RunGame.prototype; //初始化 _proto.init = functio...

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

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

...ddChild(over); } hero类: (function() { function Hero(type, hp) { Hero.__super.call(this); this.fly(); } Laya.class(Hero,"Hero", Air); var _proto = Hero.prototype; _proto.fly = function() { this.playAction("fly") } })(); air类: (function() { function Air(type, hp) { this.hp = hp; this.type = ty...

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

125. js继承模式 [ 66%]

...on() { Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProp...

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

126. 升级2.0以后,部分浏览器的兼容性很差 [ 65%]

...ent • 2019-08-28 18:27 class TestSceneUI extends Scene { constructor() { super(); } createChildren() { super.createChildren(); this.loadScene("test/TestScene"); } } UC指这行报错,这个都是编译后的代码 addScore(value = 1) { this._score += value; this.scoreLbl.changeText(&qu...

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

127. Laya api 中可能的bug [官方来看] [ 65%]

...n(context,x,y){ var childs=this._childs; this._childs=this._showGridList; _super.prototype.render.call(this,context,x,y); this._childs=childs; }2.core中Sprite的zorder的set方法中 有一行代码有疑似bug,麻烦官方帮忙确认 /**z排序,更改此值,则会按照值的大小对同一...

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

128. js飞机大战报错 请大神看看 [ 65%]

...       this.infoLabel=null; GameInfo.js: var GameInfo = (function (_super) {     function GameInfo() {         GameInfo.super(this);         // this.infoLabel.text = "abc"; 这个也报异常应该是找不到infoLabel         // 注册按钮点击事件 点击后暂停游戏   ...

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

129. 这样的panel请问如何实现比较好? [ 64%]

...划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的按钮,会隐藏该层,同时显示上一层 this.btnC...

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

130. 含有List的Scene移除后List的item未移除,性能面板的Sprite一直增长 [ 64%]

...到问题了,item继承Laya.Scene,调用LoadScene加载界面,进入super.createView,调用 Laya.SceneUtils.createByData就会回收不掉, 2022-10-19 0 1 分享 微博 QZONE 微信 wxid_mq3mt1b4zxfq22 赞同来自: 修改之后 性能面板的Sprite对应的值不对了,会变成负数...

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