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

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

121. img无法显示(一个小BUG,求解决) [ 73%]

...标位置全部重置到img(地图本体)的00 点上了。并没有pos到指定点位   小图标pos,加了一个单位的像素点的偏移值,然后就好了,这个是什么情况? 附件 : --> 2017-10-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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

122. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 73%]

...estDialogUI; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; _path2.rotation = Math.atan2(b.y - a.y+300, b.x - a.x) / Math.PI * 180; _path2.pos(a.x,a.y); this.addChild(_path2); var le...

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

123. 关于mouseThrough设计原理问题? [ 73%]

...prite(); a.graphics.drawRect(0,0,200, 200, "#00ff00"); a.size(200, 200); a.pos(0, 0); a.on(Event.CLICK, null, function(e:Event):void{ trace("click a"); }) Laya.stage.addChild(a); var b:Sprite = new Sprite(); b.graphics.drawRect(0,0,200, 200, "#0000ff"); b.size(200, 200); b.pos(100, 100); b.mouseThro...

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

124. 飞机大战地图滚动报错,麻烦看下? [ 72%]

...= new laya.display.Sprite();     bg2.loadImage("res/bg1.png");     bg2.pos(650, 0);     box.addChild(bg2);     Laya.timer.frameLoop(1, this, bg_loop()); } function bg_loop() {     box.x -= 1;     if (bg1.x + box.x <= 0) {         bg1.y = 650     }     if (bg2.x + box.x <= 0...

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

125. 分享一个自己做的游戏公告功能,跑马灯效果 [ 72%]

...r() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this._createBg() this._createView() this.on(Laya.Event.UNDISPLAY,this,this.stop) this.on(Laya.Event.DISPLAY,this,this.play) } /** 创建滚动区域 */ _createView() { this.hornBox = new Box() ...

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

126. 封装类的时候 怎么在类中表示自身? [ 72%]

...und.png"); this.addChild(bg1); bg2.loadImage("../bin/background.png"); bg2.pos(0,-852); this.addChild(bg2); 用this.addchild老是出错 2016-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同...

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

127. DOM元素-视频 [ 72%]

...t reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的...

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

128. 屏幕适配的缩放模式详解(JavaScript-2D基础篇(JS)-屏幕适配) [ 72%]

...式("+modes+") ";         txt.bold = true;         txt.pos(10, 350);         txt.fontSize = 60;         txt.color   = "#fff000";         Laya.stage.addChild(txt);     })();   })(); ``` ### 二、fixedheight模式 ​ fixedheight 模式下,画...

来源: Laya2.0_文档 发布时间: 20200307

129. 性能测试-虫子(慎入) [ 72%]

... + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } tick += 0.1; } } new PerformanceTest_Maggots();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya.Handler; import Stat = Laya.Stat; import Rectangle = Laya.Rectangle; ...

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

130. 图集加载后通过 图集名/图片名 显示不出图片 [ 72%]

...不需要再去指定资源类型 还有个问题就是你设置的坐标pos,以上步骤做完之后修改下pos的x坐标就能看到图片了! 2017-08-24 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 layaxiaohu 相关问题 请...

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