大约有 56 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0061 秒)
... = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.loader.getRes("res/en_bar.png"); break; case Hp.HP_TYPE_SPEED: texture2 = Laya.loader.getRes("res/hp_bar.png"); break; } th...
来源: Laya_社区 发布时间: 20160803
...sprite3D对象 附件上传了我的工程文件。 如果是使用Laya.loader.create("model/build/warehouse1/warehouse1.lh", Laya.Handler.create(this, onComplete)); function onComplete() { //仓库原型 warehouse1 = Laya.Sprite3D.load("model/build/warehouse1/warehouse1.lh"); scene.addChild(ware...
来源: Laya_社区 发布时间: 20180104
...Normal()来切换一下渲染方式。 例如:onEnable(): void { Laya.loader.load("swk/zhujue_wk.skel", Laya.Handler.create(this, () => { this.owner.getComponent(Laya.Spine2DRenderNode).changeNormal(); })); } 2024-10-10 0 1 分享 微博 QZONE 微信 layabox 赞同来自: 已记录,我...
来源: Laya_社区 发布时间: 20240929
...代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader; class GameBootstrap{ public constructor(){ this.init(); } private init():void{ //初始化微信小游戏 Laya.MiniAdpter.ini...
来源: Laya_社区 发布时间: 20180529
....js 在之前的基础上增加加载图片的代码://加载图片 Laya.loader.load(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoad...
来源: Laya_社区 发布时间: 20160722
...; } private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private function onLoaded():void { //实例UI界面 //var testView:TestView = n...
来源: Laya_社区 发布时间: 20180525
...: // 程序入口 class GameMain{ constructor(){ var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; var ProtoBuf = Browser.window.protobuf; Laya.init(550, 400); //加载协议...
来源: Laya_社区 发布时间: 20170216
...tion.Laya3D._getSprite3DHierarchyInnerUrls (libs/laya.d3.js:1837) at Loader.Laya3D._onHierarchylhLoaded (libs/laya.d3.js:1933) at EventHandler.__proto.runWith (libs/laya.core.js:1628) at Loader.__proto.event (libs/laya.core.js:1384) at Loader.__proto.complete (libs/laya.core....
来源: Laya_社区 发布时间: 20170428
...的示例代码为: ```javascript //atlas方式图集使用示例 Laya.loader.load("./res/test/c1.atlas", Laya.Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图...
来源: Laya2.0_文档 发布时间: 20210715
...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为...
来源: Laya2.0_文档 发布时间: 20210714