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

大约有 900 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0057 秒)

181. Sprite-遮罩-放大镜 [ 76%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader.getRes(bgPath), maskRes = Laya.loader.getRes(maskPath); let bg = new Sprite(); Laya.stage...

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

182. 请问怎么监听在IDE中创建的UI中资源的加载进度呢 [ 76%]

...的加载进度呢 我在IDE中创建了整个游戏界面,然后通过loader去加载界面的配置文件:Laya.loader.load(['res/atlas/game.json'],Laya.Handler.create(this,Slot.onSourcesLoaded), Laya.Handler.create(this,Slot.onSourcesLoading,null,false),Laya.Loader.ATLAS);这样写似乎监听...

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

183. 微信小游戏报错 the .lh file root type must be Scene [ 76%]

...) at ResInfo.__proto.event (http://127.0.0.1:62629/game/code.js:483:28) at LoaderManager.__proto._endLoad (http://127.0.0.1:62629/game/code.js:13152:11) at Loader.onLoaded (http://127.0.0.1:62629/game/code.js:13128:10) at EventHandler.__proto.runWith (http://127.0.0.1:62629/game/code.js:711:59) at L...

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

184. ios load后 声音播放问题 [ 76%]

...; resurls.push({url:"http://192.168.6.132:8900/bin/comp/tap.mp3",type:Laya.Loader.SOUND});Laya.loader.load(resurls, Handler.create(this, onLoaded), Handler.create(this, onLoading, null, false)); function onLoaded(){ console.log(Laya.loader.getRes(src)); }   在chrome,安卓下都是正常的,...

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

185. UI-TextArea [ 76%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { var ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15);...

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

186. Laya.loader.getRes [ 76%]

Laya.loader.getRes Laya.loader.getRes会报错,uri.indexof is not a function错误.代码如图所示 附件 : --> 2020-03-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 awua 赞同来自: 你这个url就是...

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

187. UI-ColorPicker [ 76%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onColorPickerSkinLoaded)); })(); function onColorPickerSkinLoaded() { var colorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = skin; colorPicker.pos...

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

188. UI-TextArea [ 76%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(skin, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { const TextArea = Laya.TextArea; let ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3...

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

189. 预加载音频文件遇到的问题 [ 76%]

...载音频的代码(JS飞机大战示例), //加载声音资源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.cre...

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

190. UI-ColorPicker [ 76%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, this.onColorPickerSkinLoaded)); } onColorPickerSkinLoaded() { const ColorPicker = Laya.ColorPicker, Handler = Laya.Handler; let colorPicker = new ColorPicker(); colorPicker.selectedColor...

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