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

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

161. Layabox web 复制一段文字到剪贴板 [ 71%]

...position = "absolute"; this.newMask.style.zIndex = "1"; this.newMask.style.width = "100%"; this.newMask.style.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) + 100 + "px"; this.newMask.style.top = "0px"; this.newMask.style.left = "0px"; this.newMask.style.backgro...

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

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

...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

163. sprite添加click监听事件反应迟钝 [ 71%]

...没有问题 drawyuan.size(100, 100); var x = Math.random() * Laya.stage.width; var y = Math.random() * Laya.stage.height; console.log(x + "" + y); drawyuan.pos(x,y); return drawyuan; } 2017-09-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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

164. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 71%]

...te_:Sprite = new Sprite(); var bitmap_:BitmapData = new BitmapData(_loader.width, _loader.height); bitmap_.draw(_loader, new Matrix()); var matrix:Matrix = new Matrix(); matrix.rotate(Math.PI/4); sprite_.graphics.beginBitmapFill(bitmap_, matrix, true); sprite_.graphics.drawRect(100, 50, 200, 90); sp...

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

165. hitTestPrior点击穿透 [ 71%]

...tPrior window[`hitTestPrior`] = () => { let box1 = new Laya.Box(); box1.width = box1.height = 500; let sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, box1.width, box1.height, `#999900`); box1.addChild(sp); box1.clickHandle = () => { lizheng.log(`点击了box1`); } box1.hitTestPrior = false...

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

166. 文字在框内滑动、滚动文本 [ 71%]

...00);     //这里没看出来是什么意思     this.txt.x=Laya.stage.width-this.txt.width>>1;     this.txt.y=Laya.stage.height-this.txt.height>>1;     this.txt.borderColor="#ffff00";     this.txt.fontSize=20;     this.txt.color="#ffffff";     Laya.stage.addChild(this.txt)...

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

167. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 71%]

...ickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e...

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

168. [LayaAirIDE3]2d相机打包后问题 [ 71%]

...meraController);          // 设置边界参数         const MAP_WIDTH = 6294;         const MAP_HEIGHT = 4196;         const MAP_X = -1230;         const MAP_Y = -849;          this.playerScript.mapMinX = MAP_X;         this.playerScript.mapMaxX = MAP_X + MAP_WIDTH; ...

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

169. 用javascript如何实现游戏登录游戏前的资源加载进度,如何将图片,音乐等素材加载到界面通过加载条显示加载进度 [ 71%]

...atas(); } public updataPosition() { this.progressUI.setPosition(Laya.stage.width / 2, Laya.stage.height / 2); } public loadMainDatas() { Laya.loader.load([ { url: "res/ui/UIComponents@atlas0.png", type: Loader.IMAGE }, { url: "res/ui/UIComponents.fui", type: Loader.BUFFER }, { url: "res/ui/FastBet.f...

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

170. 字体切片组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 71%]

...,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fontclp.size(500, 60); //大小 this.fontclp.pivot(this.fontclp.width/2, this.fontclp.height/2); //轴心点 this.fontclp.skin = "atlas/comp/fontClip_num.png"; thi...

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