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

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

71. 子容器的事件问题 [ 80%]

...r引擎 子容器的事件问题 // 程序入口 Laya.init(800, 800); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); let vhvt: Vi...

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

72. 咨询在Laya.Sprite3D中,是否含有类似于 Sprite 中的getbounds函数 [ 80%]

...的,所以不能在下一行代码立刻获取数据,推荐使用Laya.loader.create yinglei999 • 2017-11-17 19:10 1.数据都为零,需要获取的数据需要在资源加载的回调中进行 我不太明白,在Laya.MeshSprite3D.load 这个函数中只有一个参数是具体的地址 而...

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

73. 鼠标交互-Hold [ 80%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(this, createApe)); })(); function createApe() { // 添加一只猩猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, tex...

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

74. 分享:LayaAir下如何加载和使用.JSON文件! [ 80%]

...:LayaAir下如何加载和使用.JSON文件! package { import laya.net.Loader; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():v...

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

75. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 80%]

...可以找到drawTexture()方法,除此之外,还需要了解laya.net.LoaderManager中的load()方法和getRes()方法,以及laya.utils.Handler中的create()方法,各方法的参数图3、图4、图5、图6所示: ![图3](img/3.png) (图3) ![图4](img/4.png) (图4) ![图2](img/5.png) (图5...

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

76. 如何批量加载位图字体? [ 80%]

...个回复 Monica - 知识达人 赞同来自: 预加载的话直接用Laya.loader.load加载即可 2017-09-20 0 6 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 szsailing 相关问题 微信小游戏如何使用ttf字体? 加载到舞台...

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

77. 动态加载的图片不响应按钮点击事件 [ 80%]

...URLRequest = new URLRequest(); imgURL.url="res/data/image/522.png"; var imgLoader:Loader = new Loader(); imgLoader.load(imgURL); imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finished); function finished(evt:Event):void { var img:Bitmap = new Bitmap(evt.target.content.bitmapData); sta...

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

78. 内存优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 79%]

...源的进度进行显示,下面的编码为就是错误的。 1. `Laya.loader.load(urls, Laya.Handler.create(this, onAssetLoaded), Laya.Handler.create(this, onLoading));` 在上面的代码中,使用`Laya.Handler.create(this,onLoading)`返回的回调方法,是要处理progress加载进度事...

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

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

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

80. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 79%]

...olor = "#101825"; this.init() } init() { // 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUS...

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