大约有 492 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0042 秒)
... { @property({ type: Laya.Image }) public img: Laya.Image; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.img.skin = "resources/layaAir.png";//设置皮肤 this.img.useSourceSize = true;//...
来源: Laya3.0_文档 发布时间: 20251010
...代码(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
...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
...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
...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
...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
... this.infoLabel=null; GameInfo.js: var GameInfo = (function (_super) { function GameInfo() { GameInfo.super(this); // this.infoLabel.text = "abc"; 这个也报异常应该是找不到infoLabel // 注册按钮点击事件 点击后暂停游戏 ...
来源: Laya_社区 发布时间: 20171118
...划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的按钮,会隐藏该层,同时显示上一层 this.btnC...
来源: Laya_社区 发布时间: 20180810
...到问题了,item继承Laya.Scene,调用LoadScene加载界面,进入super.createView,调用 Laya.SceneUtils.createByData就会回收不掉, 2022-10-19 0 1 分享 微博 QZONE 微信 wxid_mq3mt1b4zxfq22 赞同来自: 修改之后 性能面板的Sprite对应的值不对了,会变成负数...
来源: Laya_社区 发布时间: 20221018
...测到按键按下,却一直输出undefined var GameStart = (function (_super) { function GameStart() { GameStart.super(this); Laya.stage.on(Laya.Event.KEY_DOWN,LayaSample,Test); } function Test(e){ console.log(e.keycode); ...
来源: Laya_社区 发布时间: 20180208