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

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

451. layaAir支持xml加载和使用吗 [ 71%]

...1 个回复 cuixueying 赞同来自: 代码如下package { import laya.net.Loader; import laya.utils.Handler; public class XmlDemo { public function XmlDemo() { Laya.init(550,400); Laya.loader.load("data.xml",Handler.create(this,onLoaded),null,Loader.XML); } private function onLoaded():void { // TOD...

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

452. LayaAir 如何读取资源中的txt文件中的内容 [ 71%]

...的txt文件中的内容 var testPath ="res/Test.txt"; console.log( Laya.loader.load(testPath)); console.log(Laya.Loader.getRes(testPath)); 这里打印的是 LoaderManager {retryNum: 1, retryDelay: 0, maxLoader: 5, _loaders: Array(4), _loaderCount: 1…} undefined 并不是文本的内容,求支...

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

453. UI-Dialog [ 71%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Handler.create(this, this.onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new Dialog(); let bg = new Image(assets[0]); dial...

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

454. 请问在设计模式下制作的UI页面,到底怎么在代码里使用???官方教程不一样 [ 71%]

...图片资源的atlas文件,何解???例如官方的例子:Laya.loader.load(["./res/atlas/ListPage.atlas", "res/atlas/template/ButtonTab.atlas"], Handler.create(this, this.onLoaded)); 而我F12发布,根本没有这个ListPage.atlas,只有ButtonTab.atlas     附件 : --> 2017-09-04 ...

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

455. ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null [ 71%]

ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null   附Demo。   想做不同场景之间的切换。 spriteBtn.on(Laya.Event.CLICK, this, function (e) { Laya.stage.destroyChildren(); newScene(); });问题:LayaAirUnityP...

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

456. native 资源加密 [ 71%]

...还有 我只加载动画使用的资源好想不可以?还有使用Laya.Loader的方式能不能加载ani文件? 在微信小游戏环境下加载资源有个大坑 获取图片资源出错,求大神解答,附代码 使用layaIDE发布项目之后,资源加载不到 ui编辑器编辑了...

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

457. Laya2.3.0设置basePath后,打包微信Laya.Texture2D.load图片失败 [ 71%]

...在Laya2.3.0的laya.wxmini.js中MinAspter的init方法里添加一行Laya.Loader.prototype._loadImage = MiniImage.prototype._loadImage;即可正常 附件 : --> 2019-12-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个...

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

458. 加载的图集会自动销毁 [ 71%]

加载的图集会自动销毁 使用Laya.loader.load加载图集,cache参数为默认值true   加载后实例化的界面正常使用该图集显示   经过一段其它加载逻辑后该图集丢失,通过Loader.getRes获取为undefined   实例化相关界面loseskin 代码中没有任...

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

459. 分享:Dragonbones/Spine的换肤操作 [ 71%]

...xture 准备好的图片head3.png 放置资源目录下 获取texture Laya.loader.load('head3.png',Handler.create(this,onTextureLoaded)); } private var texture:Texture; private function onTextureLoaded():void { texture=Loader.getRes('head3.png'); }整体代码如下package { import laya.ani.bone.Ske...

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

460. Mac下LayaAirIDE1.7.20版本声音预加载失败,但windows下同个版本加载正常 [ 71%]

...Arr:Array=[             {url:"res/sound/music_gameplay.mp3", type:Loader.SOUND},             {url:"res/sound/button.mp3", type:Loader.SOUND},             {url:"res/sound/mob_true.mp3", type:Loader.SOUND},             {url:"res/sound/mob_hit.mp3", type:Loader.SOUND...

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