大约有 237 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0041 秒)
...: 我新写了个例子,发现个新问题 import Sprite = Laya.Sprite; class Test extends Sprite{ constructor(){ super(); this._initView(); } private _initView():void { let sprite:Sprite = new Sprite(); sprite.loadImage("res/scene/1001/layer1/qiang.jpg", 100, 100, 100, 100); this.addChild(sprite)...
来源: Laya_社区 发布时间: 20180308
...his); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite); //定义RunGame的prototype var _proto = RunGame.prototype; //初始化 _proto.init = function(){ console.log('RunGame Init'); } })(); 此处我们要说一下 Laya.class(RunGa...
来源: Laya_社区 发布时间: 20160722
... this, this.onPauseBtnClick); this.reset(); } Laya.class(GameInfo, "GameInfo", _super); var _proto = GameInfo.prototype; _proto.reset = function(){ this.infoLabel.text = ""; this.hp(5); this.level(0); this.score(0); ...
来源: Laya_社区 发布时间: 20170416
...nction Role () { Role._super.call(this); /***一些基础信息***/ } Laya.class( Role , "Role" , Sprite ); var _proto_ = Role.prototype; /******/ return Role; })(); 2018-10-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2...
来源: Laya_社区 发布时间: 20181012
...nction (_super) { function Load_() { Load_.super(this); } //注册类 Laya.class(Load_, "Load_", _super); var _proto = Load_.prototype; _proto.run_Fast = function () { console.log("逻辑处理"); } return Load_; })(Laya.Sprite);我的代码,但是下面的继承位置Laya.Sprite这里不写会报...
来源: Laya_社区 发布时间: 20180705
... { 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.85; UIConfig.closeDialogOnSide = false; this.diango = new Laya.Dialog(); this.diango.width ...
来源: Laya_社区 发布时间: 20171107
...#123000'); this.addChild(ccc); //ccc.x = -30 } Laya.class(layaSlot,null,Sprite); 代码是这样的 我的想法是 在viewport之外的 应该是不会显示的 在viwport之内显示的应该是会显示的 但是实际上跑出来发现只要设置了这个viewport 这...
来源: Laya_社区 发布时间: 20170323
... this.bg1.loadImage("res/background.png"); this.addChild(this.bg1); } Laya.class(Background,"Background",_super); window.Background=Background; return Background; })(Laya.Sprite); 2017-04-20 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人...
来源: Laya_社区 发布时间: 20170420
... this.bg1.loadImage("war/background.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite);报错 "TypeError: this.addChild is not a function at BackGround (file:///D:/test/laya/myLaya/src/BackGround.js:6:14) at Game (file:///D:/tes...
来源: Laya_社区 发布时间: 20181003
...say.width/2, "#00ffff"); this.circle.blendMode = "destination-out"; } Laya.class(IndexView,"IndexView",_super); IndexView.prototype.loadProgress = function(){ this.box.addChild(this.circle); if(this.angle <= 360){ this.angle+=12; this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, thi...
来源: Laya_社区 发布时间: 20170807