大约有 230 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0059 秒)
...实现两个能量条的功能,我们创建一个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
...有东西;当三秒后游戏结束,点重新开始,飞机才出来 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
...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
...q502416708 • 2017-02-06 16:57 我现在js这样写的: var LabelAtlas=(function(_super){ function LabelAtlas(url,clipX,clipY){ LabelAtlas.__super.call(this); (clipX===void 0)&& (clipX=1); (clipY===void 0)&& (clipY=1); this._clipX=clipX; this._clipY=clipY; this.skin=url; } __class...
来源: Laya_社区 发布时间: 20170206
...调用 我需要写一个工具类进行一些逻辑的处理 var Load_ = (function (_super) { function Load_() { Load_.super(this); } //注册类 Laya.class(Load_, "Load_", _super); var _proto = Load_.prototype; _proto.run_Fast = function () { console.log("逻辑处理"); } return Load_; })(Laya.Sp...
来源: Laya_社区 发布时间: 20180705
...如何使我的自定义类UIDropBox继承Laya.Sprite? var UIDropBox = (function () { var Sprite = Laya.Sprite; var Text = Laya.Text; function UIDropBox() { UIDropBox.super(this); this.txt = this.getTextFeild(); this.txt.y = 50; this.txt.text = 'aasassa'; console.log(this.addChild);//undefined con...
来源: Laya_社区 发布时间: 20161226
..., laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoading: " + progress); } //加载完毕 function onLoaded(){ console.log("onLoaded"); } 我们刷新页面看看有什么效果 如下图所示 我们看到 图片加载了 而且...
来源: Laya_社区 发布时间: 20160722
...个版本修复, chaincollider的 方法 override protected function getDef():* { if (!_shape) { _shape = new window.box2d.b2ChainShape(); _setShape(false); } ...
来源: Laya_社区 发布时间: 20181116
...TOM;并且需要重写该类的渲染处理函数 */ var myShaderSprite = (function (_super) { this.iNum = 0; function myShaderSprite() { myShaderSprite.super(this); } Laya.class(myShaderSprite, "myShaderSprite", _super); /* 初始化此类 texture纹理对象 vb顶点数组 ib顶点索引...
来源: Laya_社区 发布时间: 20180619
...项目开发更高效。// 这段代码需要在setupDemo之前执行。 (function() { // 项渲染器 var Box = Laya.Box; var Image = Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = f...
来源: Laya_示例 发布时间: 20260929