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

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

151. 关于mouseThrough设计原理问题? [ 72%]

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

152. UI-ComboBox [ 72%]

...oadComplete() { let cb = this.createComboBox(skin); cb.autoSize = true; cb.pos((Laya.stage.width - cb.width) / 2, 100); cb.autoSize = false; } createComboBox(skin) { const ComboBox = Laya.ComboBox, Handler = Laya.Handler; let comboBox = new ComboBox(skin, "item0,item1,item2,item3,item4,item5"); Laya...

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

153. 封装类的时候 怎么在类中表示自身? [ 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

154. 分享一个自己做的游戏公告功能,跑马灯效果 [ 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

155. 飞机大战地图滚动报错,麻烦看下? [ 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

156. 屏幕适配的缩放模式详解(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

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

158. 文本-位图字体 [ 72%]

...名称,以字符串形式表示 txt.leading = 5; // 垂直行间距 txt.pos(Laya.stage.width - txt.width >> 1, Laya.stage.height - txt.height >> 1); } } new Text_BitmapFont();module laya { import BitmapFont = Laya.BitmapFont; import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Lay...

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

159. 性能测试-虫子(慎入) [ 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

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

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

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