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

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

121. Laya中Button等组件lose skin的问题 [ 88%]

...n);             return;         };         var width=img.sourceWidth;         var height=img.sourceHeight / this._stateNum;         img.$_GID || (img.$_GID=Utils.getGID());         var key=img.$_GID+"-"+this._stateNum;         var clips=Wea...

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

122. 【简单跑酷--JS版】---Lv.6 终篇 [ 88%]

...lay.Sprite); var _proto = Hp.prototype; _proto.init = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.loader.getRes("res/en_bar.png"); break; case Hp.HP_TYPE_SPEED: texture2 ...

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

123. hitArea用法问题 [ 88%]

...Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.clos...

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

124. UI-Label [ 88%]

...).pos(290, 150); } function createLabel(color, strokeColor) { const STROKE_WIDTH = 4; var label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } Laya...

来源: Laya_示例 发布时间: 20260303

125. ReferenceError: Loading_fly is not defined [ 88%]

...ig.closeDialogOnSide = false; this.diango = new Laya.Dialog(); this.diango.width = Laya.stage.width; this.diango.height = Laya.stage.height; var loading_array = []; for(var i = 1; i < 28; i++ ){ loading_array.push('loading/'+ i +'@2x.png',) } Laya.Animation.createFrames(loading_array, 'loading') ...

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

126. Sprite-新手引导 [ 88%]

...skArea); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000"); // 绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); guideContainer.addChild(interactionArea); // 设置叠加模式 interacti...

来源: Laya2.0_示例 发布时间: 20260303

127. Sprite-新手引导 [ 87%]

...prite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //设置叠加模式 interactionArea...

来源: Laya_示例 发布时间: 20260303

128. 没有预加载的图片怎么获取width和height ? [ 87%]

没有预加载的图片怎么获取width和height ? new了一个Image,使用的没有预加载的图片,getGraphicBounds得到的width 和 height 都是 0,,怎么知道width和height? 2017-01-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

129. 请问图片大小可以手动设置宽高吗?怎么设置,看到API里的Sprite的width和height无法设置,只用于碰撞检测 [ 87%]

...大小可以手动设置宽高吗?怎么设置,看到API里的Sprite的width和height无法设置,只用于碰撞检测 2018-01-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: this.bg_im...

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

130. 关于打包App后Texture.getPixels此方法不能使用 [ 87%]

...tPixels此方法不能使用 public function getPixels(x:Number, y:Number, width:Number, height:Number):Array {     if (Render.isWebGL) {        return RunDriver.getTexturePixels(this, x, y, width, height);     } else {       Browser.canvas.size(width, height);       Browser.canvas.cle...

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