├── .laya ├── launch.json └── publish_window.json ├── Lolo-Horizon.laya ├── README.md ├── bin ├── index.html ├── libs │ ├── LayaRender.js │ ├── laya.ani.js │ ├── laya.core.js │ ├── laya.d3.js │ ├── laya.d3.min.js │ ├── laya.d3Plugin.js │ ├── laya.debugtool.js │ ├── laya.device.js │ ├── laya.filter.js │ ├── laya.html.js │ ├── laya.particle.js │ ├── laya.pathfinding.js │ ├── laya.tiledmap.js │ ├── laya.ui.js │ ├── laya.webgl.js │ ├── matter.js │ ├── min │ │ ├── laya.ani.min.js │ │ ├── laya.core.min.js │ │ ├── laya.d3.min.js │ │ ├── laya.d3Plugin.min.js │ │ ├── laya.debugtool.min.js │ │ ├── laya.device.min.js │ │ ├── laya.filter.min.js │ │ ├── laya.html.min.js │ │ ├── laya.particle.min.js │ │ ├── laya.pathfinding.min.js │ │ ├── laya.tiledmap.min.js │ │ ├── laya.ui.min.js │ │ └── laya.webgl.min.js │ ├── protobuf.js │ └── worker.js ├── res │ ├── BackGround.png │ ├── BackGround.png.bak.png │ ├── atlas │ │ ├── .rec │ │ ├── comp.atlas │ │ ├── comp.json │ │ ├── comp.png │ │ └── rec │ ├── bird │ │ ├── bird_1.png │ │ ├── bird_2.png │ │ ├── bird_3.png │ │ └── bird_4.png │ ├── cat_sleep.png │ ├── effect.png │ ├── floor.png │ ├── hp │ │ ├── en_bar.png │ │ ├── hp_bar.png │ │ └── hp_bg.png │ ├── item │ │ ├── item_1.png │ │ ├── item_2.png │ │ ├── item_3.png │ │ └── item_4.png │ ├── m_background.png │ ├── particle │ │ ├── heart.png │ │ └── particle.part │ ├── player.atlas │ ├── player.json │ ├── player.png │ ├── player │ │ ├── chara_01.png │ │ ├── chara_02.png │ │ ├── chara_03.png │ │ ├── chara_04.png │ │ ├── chara_05.png │ │ ├── chara_06.png │ │ ├── chara_07.png │ │ ├── chara_08.png │ │ ├── chara_09.png │ │ ├── chara_10.png │ │ ├── chara_11.png │ │ ├── chara_12.png │ │ ├── chara_13.png │ │ ├── chara_14.png │ │ ├── chara_15.png │ │ └── chara_16.png │ ├── rec │ ├── spiritEffect.png │ ├── tree0.png │ └── wav │ │ ├── BG.wav │ │ ├── DecelerationCounting.wav │ │ ├── InvincibleCounting.wav │ │ ├── Invincible_end.wav │ │ ├── Invincible_start.wav │ │ ├── LowerSpeed.wav │ │ └── StarCounting.wav └── unpack.json ├── jsconfig.json ├── laya ├── .laya └── assets │ └── comp │ ├── bg.png │ ├── blank.png │ ├── btn_close.png │ ├── button.png │ ├── checkbox.png │ ├── clip_num.png │ ├── clip_selectBox.png │ ├── clip_tree_arrow.png │ ├── clip_tree_folder.png │ ├── combobox.png │ ├── hscroll$bar.png │ ├── hscroll$down.png │ ├── hscroll$up.png │ ├── hscroll.png │ ├── hslider$bar.png │ ├── hslider.png │ ├── html.png │ ├── image.png │ ├── label.png │ ├── linkbutton.png │ ├── progress$bar.png │ ├── progress.png │ ├── radio.png │ ├── radiogroup.png │ ├── tab.png │ ├── textarea.png │ ├── textinput.png │ ├── vscroll$bar.png │ ├── vscroll$down.png │ ├── vscroll$up.png │ ├── vscroll.png │ ├── vslider$bar.png │ └── vslider.png ├── libs └── LayaAir.d.ts ├── rec.mp4 ├── release └── layaweb │ └── 1.0.0 │ ├── apk │ └── 洛洛地平线.apk │ ├── index.html │ ├── js │ ├── Config.js │ ├── init.js │ └── runGame │ │ ├── BackGround.js │ │ ├── EnergyBar.js │ │ ├── Floor.js │ │ ├── GameInfo.js │ │ ├── Item.js │ │ ├── Loading.js │ │ ├── MapFloor.js │ │ ├── Npc.js │ │ ├── Player.js │ │ └── RunGame.js │ ├── libs │ ├── LayaRender.js │ ├── laya.ani.js │ ├── laya.core.js │ ├── laya.d3.js │ ├── laya.d3.min.js │ ├── laya.d3Plugin.js │ ├── laya.debugtool.js │ ├── laya.device.js │ ├── laya.filter.js │ ├── laya.html.js │ ├── laya.particle.js │ ├── laya.pathfinding.js │ ├── laya.tiledmap.js │ ├── laya.ui.js │ ├── laya.webgl.js │ ├── matter.js │ ├── min │ │ ├── laya.ani.min.js │ │ ├── laya.core.min.js │ │ ├── laya.d3.min.js │ │ ├── laya.d3Plugin.min.js │ │ ├── laya.debugtool.min.js │ │ ├── laya.device.min.js │ │ ├── laya.filter.min.js │ │ ├── laya.html.min.js │ │ ├── laya.particle.min.js │ │ ├── laya.pathfinding.min.js │ │ ├── laya.tiledmap.min.js │ │ ├── laya.ui.min.js │ │ └── laya.webgl.min.js │ ├── protobuf.js │ └── worker.js │ ├── main.min.js │ ├── res │ ├── BackGround.png │ ├── BackGround.png.bak.png │ ├── atlas │ │ ├── .rec │ │ ├── comp.atlas │ │ ├── comp.json │ │ ├── comp.png │ │ └── rec │ ├── bird │ │ ├── bird_1.png │ │ ├── bird_2.png │ │ ├── bird_3.png │ │ └── bird_4.png │ ├── cat_sleep.png │ ├── effect.png │ ├── floor.png │ ├── hp │ │ ├── en_bar.png │ │ ├── hp_bar.png │ │ └── hp_bg.png │ ├── item │ │ ├── item_1.png │ │ ├── item_2.png │ │ ├── item_3.png │ │ └── item_4.png │ ├── m_background.png │ ├── particle │ │ ├── heart.png │ │ └── particle.part │ ├── player.atlas │ ├── player.json │ ├── player.png │ ├── player │ │ ├── chara_01.png │ │ ├── chara_02.png │ │ ├── chara_03.png │ │ ├── chara_04.png │ │ ├── chara_05.png │ │ ├── chara_06.png │ │ ├── chara_07.png │ │ ├── chara_08.png │ │ ├── chara_09.png │ │ ├── chara_10.png │ │ ├── chara_11.png │ │ ├── chara_12.png │ │ ├── chara_13.png │ │ ├── chara_14.png │ │ ├── chara_15.png │ │ └── chara_16.png │ ├── rec │ ├── spiritEffect.png │ ├── tree0.png │ └── wav │ │ ├── BG.wav │ │ ├── DecelerationCounting.wav │ │ ├── InvincibleCounting.wav │ │ ├── Invincible_end.wav │ │ ├── Invincible_start.wav │ │ ├── LowerSpeed.wav │ │ └── StarCounting.wav │ └── unpack.json ├── src ├── Config.js ├── init.js └── runGame │ ├── BackGround.js │ ├── EnergyBar.js │ ├── Floor.js │ ├── GameInfo.js │ ├── Item.js │ ├── Loading.js │ ├── MapFloor.js │ ├── Npc.js │ ├── Player.js │ └── RunGame.js ├── 洛洛地平线-功能函数文档.xls └── 落落地平线.pptx /.laya/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "layaAir", 6 | "type": "chrome", 7 | "request": "launch", 8 | "file": "${workspaceRoot}/bin/index.html", 9 | "runtimeExecutable": "${execPath}", 10 | "useBuildInServer": true, 11 | "sourceMaps": true, 12 | "webRoot": "${workspaceRoot}", 13 | "port": 9222, 14 | "fixedPort":false 15 | }, 16 | { 17 | "name": "chrome调试", 18 | "type": "chrome", 19 | "request": "launch", 20 | "url": "${workspaceRoot}/bin/index.html", 21 | // "换成自己的谷歌安装路径,": 比如 22 | //window 默认安装路径为: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" 23 | //mac 系统上的默认安装路径为 "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; 24 | // "runtimeExecutable": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe", 25 | "runtimeArgs": [ 26 | "--allow-file-access-from-files", 27 | "--allow-file-access-frome-files", 28 | " --disable-web-security" 29 | ], 30 | "sourceMaps": true, 31 | "webRoot": "${workspaceRoot}", 32 | //假如谷歌调试报userDataDir不可用,请把谷歌安装路径取得管理员权限,或者更换${tmpdir}为其他可以读写的文件夹,也可以删除。 33 | "userDataDir": "${tmpdir}", 34 | "port":9222, 35 | "fixedPort":false 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /.laya/publish_window.json: -------------------------------------------------------------------------------- 1 | {"build":{"versionName":"v0.1","merge":false,"compress":false,"recompile":false,"regenerateUI":false,"regenerateAtlas":false},"pngquant":{"showAdvanceOptions":false,"colors":8,"speed":3,"quality":[50,90],"table":{"unselectedFiles":[]}}} -------------------------------------------------------------------------------- /Lolo-Horizon.laya: -------------------------------------------------------------------------------- 1 | {"proName":"Lolo-Horizon","version":"1.7.6beta","proType":2} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lolo-Horizon 2 | 洛洛地平线 3 | 4 | # [线上demo](http://118.89.31.177/) 5 | 6 | |落落地平线-功能函数文档||||||| 7 | |:--|:--|:--|:--|:--|:--|:--| 8 | |文件名(按照加载先后顺序)|函数|参数|返回值|说明|注意事项|备注| 9 | |Config.js||||基本的配置文件||| 10 | |GameInfo.js|GameInfo()|||显示游戏的信息,显示于最外层|适用于首次加载|| 11 | ||init()|(string)message||初始化|传入的文字直接显示在开始/结束的界面上|| 12 | |Loading.js|Loading()|||显示文件加载进度|适用于首次加载|| 13 | ||init()|||初始化|初始化loading界面|| 14 | ||progress()|(float/int)value||显示文件加载的具体进度|在loading显示的时候,传入的参数会被转化成int类型,直接显示loading进度|| 15 | |init.js|onLoading()|(float/int)progress||调用Loading.js -> progress(value)|一般是由Laya.loader.load()传入,表示加载文件的进度|全局| 16 | ||onLoaded()|||加载完成后的动作||全局| 17 | ||initGame()|(boolean)isRestartGame||初始化游戏|并不是移除所有资源,而是初始化相关的参数|全局| 18 | |BackGround.js|BackGround()|||显示背景||| 19 | ||init()|||初始化背景的相关东西|内含有音频,音频没有使用预加载|| 20 | ||onLoop()|||以帧循环处理背景|帧循环相关参数在Config.js里面可设置,但是设置不正确会导致看起来很卡|| 21 | |EnergyBar.js|EnergyBar()|(string)type||根据类型显示能量条|type的具体内容请参见EnergyBar.js内"//能量类型" 下代码|| 22 | ||init()|(string)type||根据类型初始化能量条|不同的type是不同的实例,请注意实例的使用问题|| 23 | ||updateEnergyValue()|(float/int)value||根据传入的数据自动判断并缩放进度条||| 24 | ||addEnergyValue()|(float/int)value||在原来的数值上加上value,再调用updateEnergyValue(value)||| 25 | |Floor.js|Floor()|||显示地板,地板指的是人物踩上去|地板的移动速度加快就会造成人物跑的很快的现象|| 26 | ||init()|||初始化地板||| 27 | ||onLoop()|||地板的帧循环处理函数|每一块地板都是有独立的帧循环处理函数实例,当此地板完全出屏幕时,会触发Floor.OUT_DIE事件,此事件位于MapFloor.js这个地板会被销毁,此实例函数也会被清理|| 28 | ||addItem()|||在地板上添加物品|会按照Config.js内定义的物品的概率来生成物品,然后添加在地板上|| 29 | ||getAllItems()|||获取当前地板上所有的道具||| 30 | ||addBird()|||放置NPC|当前npc只有鸟|| 31 | ||getAllNpcs()|||获取当前地板上所有的npc||| 32 | ||moveFaster()|||加快地板的移动速度直到最大值|最大值请参见Config.js|| 33 | ||moveLower()|||减小地板的移动速度,这里是直接使地板值为默认值|默认值请参见Config.js|| 34 | ||checkHit()|(float/int)playerX, (float/int)playerY, (string:"up"/"down")playerStatus||判断玩家是否在地板上|这里仅仅是玩家从上方掉下来,判断是否踩到了地板|| 35 | |Item.js|Item()|||各种道具||| 36 | ||init()|(string)type||根据类型绘制道具||| 37 | ||TweenStar()|(object)item||播放人物碰到道具的效果|这个功能会影响到分数,在播放的几百毫秒内,分数会一直增加|bug| 38 | ||randomItemPosition()|(object)item|(object)item|随机道具的上下位置|传入一个实例,修改该实例的y值和旋转该道具,然后返回该实例|| 39 | |MapFloor.js|MapFloor()|||对地板进行管理||| 40 | ||init()|||初始化地板管理类||| 41 | ||onLoop()|||地板管理类使用帧循环处理地板||| 42 | ||addFloor()||(object)floor|增加地板||| 43 | ||getFloor()||(object)floor|获取一个全新的地板|调用是addFloor()|| 44 | ||delFloor()|(object)floor||删除地板||| 45 | |Npc.js|Npc()|||这个是npc相关的类||| 46 | ||init()|||初始化NPC||| 47 | ||onLoop()|||帧循环处理npc||| 48 | ||randomNpcPosition()|(object)bird|(object)bird|随机npc的上下位置|传入一个实例,修改该实例的y值和旋转该道具,然后返回该实例|| 49 | |Player.js|Player()|(object)decelerationEnergy, (object)invincibleEnergy||游戏玩家相关的类|传入的实例应当是以不同的类型产生的不同实例,请参见EnergyBar的说明|| 50 | ||init()|||初始化人物的相关动作||| 51 | ||onLoop()|||以帧循环处理人物动作|例如人物的跑动等状态|| 52 | ||playAction()|(string)action||播放人物的动作|会自动判断是否是重复动作,如果是,就不执行|| 53 | ||hitCheck()|(float/int)playerX,(float/int)playerY,(float/int)itemX,(float/int)itemY,(string:"up"/"down")itemDirectionStatus,(string)itemTpye,(string:"up"/"down")playerStatus|(boolean)isHit|判断人物是否和道具/npc相撞|需要注意的是item的坐标和player的坐标是不相同的,item的坐标参考系是地板,player的坐标参考系是整个屏幕.|| 54 | ||gotoRun()|||播放跑动的动画|调用的是playAction()函数|| 55 | ||gotoFly()|||播放飞行的动画|调用的是playAction()函数|| 56 | ||flip()|||以x轴镜像翻转人物|需要自己设置人物的y值|| 57 | ||showEffect()|||显示无敌状态下的特效|会调用到Showparticle()|| 58 | ||Showparticle()|||播放粒子效果||| 59 | ||hideEffect()|||隐藏特效||| 60 | |RunGame.js|RunGame()|||游戏入口函数||| 61 | ||init()|||游戏的初始化|以上所有的东西都在这里定义并调用|| 62 | ||onLoop()|||帧循环处理整个游戏|这里处理了碰撞事件|| 63 | ||scoreAdd()|(int)value||积分栏的增加||| 64 | ||onMouseDown()|||监听鼠标按下的事件|这里每按下一次就翻转一次人物|| 65 | ||stopAllGame()|||停止整个游戏|关键值恢复成默认值,不清除缓存|| 66 | -------------------------------------------------------------------------------- /bin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |PathFinding
类用于创建寻路。
9 | */
10 | //class laya.d3.component.PathFind extends laya.d3.component.Component3D
11 | var PathFind=(function(_super){
12 | function PathFind(){
13 | this._meshTerrainSprite3D=null;
14 | this._finder=null;
15 | this._setting=null;
16 | this.grid=null;
17 | PathFind.__super.call(this);
18 | }
19 |
20 | __class(PathFind,'laya.d3.component.PathFind',_super);
21 | var __proto=PathFind.prototype;
22 | /**
23 | *@private
24 | *初始化载入蒙皮动画组件。
25 | *@param owner 所属精灵对象。
26 | */
27 | __proto._load=function(owner){
28 | if (! (owner instanceof laya.d3.core.MeshTerrainSprite3D ))
29 | throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");
30 | _super.prototype._load.call(this,owner);
31 | this._meshTerrainSprite3D=owner;
32 | }
33 |
34 | /**
35 | *寻找路径。
36 | *@param startX 开始X。
37 | *@param startZ 开始Z。
38 | *@param endX 结束X。
39 | *@param endZ 结束Z。
40 | *@return 路径。
41 | */
42 | __proto.findPath=function(startX,startZ,endX,endZ){
43 | var minX=this._meshTerrainSprite3D.minX;
44 | var minZ=this._meshTerrainSprite3D.minZ;
45 | var cellX=this._meshTerrainSprite3D.width / this.grid.width;
46 | var cellZ=this._meshTerrainSprite3D.depth / this.grid.height;
47 | var halfCellX=cellX / 2;
48 | var halfCellZ=cellZ / 2;
49 | var gridStartX=Math.floor((startX-minX)/ cellX);
50 | var gridStartZ=Math.floor((startZ-minZ)/ cellZ);
51 | var gridEndX=Math.floor((endX-minX)/ cellX);
52 | var gridEndZ=Math.floor((endZ-minZ)/ cellZ);
53 | var boundWidth=this.grid.width-1;
54 | var boundHeight=this.grid.height-1;
55 | (gridStartX > boundWidth)&& (gridStartX=boundWidth);
56 | (gridStartZ > boundHeight)&& (gridStartZ=boundHeight);
57 | (gridStartX < 0)&& (gridStartX=0);
58 | (gridStartZ < 0)&& (gridStartZ=0);
59 | (gridEndX > boundWidth)&& (gridEndX=boundWidth);
60 | (gridEndZ > boundHeight)&& (gridEndZ=boundHeight);
61 | (gridEndX < 0)&& (gridEndX=0);
62 | (gridEndZ < 0)&& (gridEndZ=0);
63 | var path=this._finder.findPath(gridStartX,gridStartZ,gridEndX,gridEndZ,this.grid);
64 | this.grid.reset();
65 | for (var i=1;i < path.length-1;i++){
66 | var gridPos=path[i];
67 | gridPos[0]=gridPos[0] *cellX+halfCellX+minX;
68 | gridPos[1]=gridPos[1] *cellZ+halfCellZ+minZ;
69 | }
70 | if (path.length==1){
71 | path[0][0]=endX;
72 | path[0][1]=endX;
73 | }else if (path.length > 1){
74 | path[0][0]=startX;
75 | path[0][1]=startZ;
76 | path[path.length-1][0]=endX;
77 | path[path.length-1][1]=endZ;
78 | }
79 | return path;
80 | }
81 |
82 | /**
83 | *设置寻路设置。
84 | *@param value 寻路设置。
85 | */
86 | /**
87 | *获取寻路设置。
88 | *@return 寻路设置。
89 | */
90 | __getset(0,__proto,'setting',function(){
91 | return this._setting;
92 | },function(value){
93 | (value)&& (this._finder=new PathFinding.finders.AStarFinder(value));
94 | this._setting=value;
95 | });
96 |
97 | return PathFind;
98 | })(Component3D)
99 |
100 |
101 |
102 | })(window,document,Laya);
103 |
--------------------------------------------------------------------------------
/bin/libs/laya.filter.js:
--------------------------------------------------------------------------------
1 |
2 | (function(window,document,Laya){
3 | var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;
4 |
5 | var BlendMode=laya.webgl.canvas.BlendMode,Browser=laya.utils.Browser,Color=laya.utils.Color,ColorFilterAction=laya.filters.ColorFilterAction;
6 | var ColorFilterActionGL=laya.filters.webgl.ColorFilterActionGL,Filter=laya.filters.Filter,FilterActionGL=laya.filters.webgl.FilterActionGL;
7 | var Matrix=laya.maths.Matrix,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext;
8 | var RenderTarget2D=laya.webgl.resource.RenderTarget2D,RunDriver=laya.utils.RunDriver,ShaderDefines2D=laya.webgl.shader.d2.ShaderDefines2D;
9 | var Sprite=laya.display.Sprite,SubmitCMD=laya.webgl.submit.SubmitCMD,Texture=laya.resource.Texture,Value2D=laya.webgl.shader.d2.value.Value2D;
10 | /**
11 | *默认的FILTER,什么都不做
12 | *@private
13 | */
14 | //class laya.filters.FilterAction
15 | var FilterAction=(function(){
16 | function FilterAction(){
17 | this.data=null;
18 | }
19 |
20 | __class(FilterAction,'laya.filters.FilterAction');
21 | var __proto=FilterAction.prototype;
22 | Laya.imps(__proto,{"laya.filters.IFilterAction":true})
23 | __proto.apply=function(data){
24 | return null;
25 | }
26 |
27 | return FilterAction;
28 | })()
29 |
30 |
31 | /**
32 | *@private
33 | */
34 | //class laya.filters.WebGLFilter
35 | var WebGLFilter=(function(){
36 | function WebGLFilter(){};
37 | __class(WebGLFilter,'laya.filters.WebGLFilter');
38 | WebGLFilter.enable=function(){
39 | if (WebGLFilter.isInit)return;
40 | WebGLFilter.isInit=true;
41 | if (!Render.isWebGL)return;
42 | RunDriver.createFilterAction=function (type){
43 | var action;
44 | switch (type){
45 | case /*laya.filters.Filter.COLOR*/0x20:
46 | action=new ColorFilterActionGL();
47 | break ;
48 | case /*laya.filters.Filter.BLUR*/0x10:
49 | action=new BlurFilterActionGL();
50 | break ;
51 | case /*laya.filters.Filter.GLOW*/0x08:
52 | action=new GlowFilterActionGL();
53 | break ;
54 | }
55 | return action;
56 | }
57 | }
58 |
59 | WebGLFilter.isInit=false;
60 | WebGLFilter.__init$=function(){
61 | BlurFilterActionGL;
62 | ColorFilterActionGL;
63 | GlowFilterActionGL;
64 | Render;
65 | RunDriver;{
66 | RunDriver.createFilterAction=function (type){
67 | var action;
68 | switch (type){
69 | case /*laya.filters.Filter.BLUR*/0x10:
70 | action=new FilterAction();
71 | break ;
72 | case /*laya.filters.Filter.GLOW*/0x08:
73 | action=new FilterAction();
74 | break ;
75 | case /*laya.filters.Filter.COLOR*/0x20:
76 | action=new ColorFilterAction();
77 | break ;
78 | }
79 | return action;
80 | }
81 | }
82 | }
83 |
84 | return WebGLFilter;
85 | })()
86 |
87 |
88 | /**
89 | *模糊滤镜
90 | */
91 | //class laya.filters.BlurFilter extends laya.filters.Filter
92 | var BlurFilter=(function(_super){
93 | function BlurFilter(strength){
94 | this.strength=NaN;
95 | BlurFilter.__super.call(this);
96 | (strength===void 0)&& (strength=4);
97 | if (Render.isWebGL)WebGLFilter.enable();
98 | this.strength=strength;
99 | this._action=RunDriver.createFilterAction(0x10);
100 | this._action.data=this;
101 | }
102 |
103 | __class(BlurFilter,'laya.filters.BlurFilter',_super);
104 | var __proto=BlurFilter.prototype;
105 | /**
106 | *@private 通知微端
107 | */
108 | __proto.callNative=function(sp){
109 | sp.conchModel &&sp.conchModel.blurFilter&&sp.conchModel.blurFilter(this.strength);
110 | }
111 |
112 | /**
113 | *@private
114 | *当前滤镜对应的操作器
115 | */
116 | __getset(0,__proto,'action',function(){
117 | return this._action;
118 | });
119 |
120 | /**
121 | *@private
122 | *当前滤镜的类型
123 | */
124 | __getset(0,__proto,'type',function(){
125 | return 0x10;
126 | });
127 |
128 | return BlurFilter;
129 | })(Filter)
130 |
131 |
132 | /**
133 | *发光滤镜(也可以当成阴影滤使用)
134 | */
135 | //class laya.filters.GlowFilter extends laya.filters.Filter
136 | var GlowFilter=(function(_super){
137 | function GlowFilter(color,blur,offX,offY){
138 | this._color=null;
139 | GlowFilter.__super.call(this);
140 | this._elements=new Float32Array(9);
141 | (blur===void 0)&& (blur=4);
142 | (offX===void 0)&& (offX=6);
143 | (offY===void 0)&& (offY=6);
144 | if (Render.isWebGL){
145 | WebGLFilter.enable();
146 | }
147 | this._color=new Color(color);
148 | this.blur=Math.min(blur,20);
149 | this.offX=offX;
150 | this.offY=offY;
151 | this._action=RunDriver.createFilterAction(0x08);
152 | this._action.data=this;
153 | }
154 |
155 | __class(GlowFilter,'laya.filters.GlowFilter',_super);
156 | var __proto=GlowFilter.prototype;
157 | /**@private */
158 | __proto.getColor=function(){
159 | return this._color._color;
160 | }
161 |
162 | /**
163 | *@private 通知微端
164 | */
165 | __proto.callNative=function(sp){
166 | sp.conchModel &&sp.conchModel.glowFilter&&sp.conchModel.glowFilter(this._color.strColor,this._elements[4],this._elements[5],this._elements[6]);
167 | }
168 |
169 | /**
170 | *@private
171 | *滤镜类型
172 | */
173 | __getset(0,__proto,'type',function(){
174 | return 0x08;
175 | });
176 |
177 | /**@private */
178 | __getset(0,__proto,'action',function(){
179 | return this._action;
180 | });
181 |
182 | /**@private */
183 | /**@private */
184 | __getset(0,__proto,'offY',function(){
185 | return this._elements[6];
186 | },function(value){
187 | this._elements[6]=value;
188 | });
189 |
190 | /**@private */
191 | /**@private */
192 | __getset(0,__proto,'offX',function(){
193 | return this._elements[5];
194 | },function(value){
195 | this._elements[5]=value;
196 | });
197 |
198 | /**@private */
199 | /**@private */
200 | __getset(0,__proto,'blur',function(){
201 | return this._elements[4];
202 | },function(value){
203 | this._elements[4]=value;
204 | });
205 |
206 | return GlowFilter;
207 | })(Filter)
208 |
209 |
210 | /**
211 | *@private
212 | */
213 | //class laya.filters.webgl.BlurFilterActionGL extends laya.filters.webgl.FilterActionGL
214 | var BlurFilterActionGL=(function(_super){
215 | function BlurFilterActionGL(){
216 | this.data=null;
217 | BlurFilterActionGL.__super.call(this);
218 | }
219 |
220 | __class(BlurFilterActionGL,'laya.filters.webgl.BlurFilterActionGL',_super);
221 | var __proto=BlurFilterActionGL.prototype;
222 | __proto.setValueMix=function(shader){
223 | shader.defines.add(this.data.type);
224 | var o=shader;
225 | }
226 |
227 | __proto.apply3d=function(scope,sprite,context,x,y){
228 | var b=scope.getValue("bounds");
229 | var shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
230 | shaderValue.setFilters([this.data]);
231 | var tMatrix=Matrix.EMPTY;
232 | tMatrix.identity();
233 | context.ctx.drawTarget(scope,0,0,b.width,b.height,Matrix.EMPTY,"src",shaderValue);
234 | shaderValue.setFilters(null);
235 | }
236 |
237 | __proto.setValue=function(shader){
238 | shader.strength=this.data.strength;
239 | }
240 |
241 | __getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.BLUR*/0x10;});
242 | return BlurFilterActionGL;
243 | })(FilterActionGL)
244 |
245 |
246 | /**
247 | *@private
248 | */
249 | //class laya.filters.webgl.GlowFilterActionGL extends laya.filters.webgl.FilterActionGL
250 | var GlowFilterActionGL=(function(_super){
251 | function GlowFilterActionGL(){
252 | this.data=null;
253 | this._initKey=false;
254 | this._textureWidth=0;
255 | this._textureHeight=0;
256 | GlowFilterActionGL.__super.call(this);
257 | }
258 |
259 | __class(GlowFilterActionGL,'laya.filters.webgl.GlowFilterActionGL',_super);
260 | var __proto=GlowFilterActionGL.prototype;
261 | Laya.imps(__proto,{"laya.filters.IFilterActionGL":true})
262 | __proto.setValueMix=function(shader){}
263 | __proto.apply3d=function(scope,sprite,context,x,y){
264 | var b=scope.getValue("bounds");
265 | scope.addValue("color",this.data.getColor());
266 | var w=b.width,h=b.height;
267 | this._textureWidth=w;
268 | this._textureHeight=h;
269 | var submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.tmpTarget);
270 | context.ctx.addRenderObject(submit);
271 | var shaderValue;
272 | var mat=Matrix.TEMP;
273 | mat.identity();
274 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
275 | shaderValue.setFilters([this.data]);
276 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"src",shaderValue,null,BlendMode.TOINT.overlay);
277 | submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.startOut);
278 | context.ctx.addRenderObject(submit);
279 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
280 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"tmpTarget",shaderValue,Texture.INV_UV,BlendMode.TOINT.overlay);
281 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
282 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"src",shaderValue);
283 | submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.recycleTarget);
284 | context.ctx.addRenderObject(submit);
285 | return null;
286 | }
287 |
288 | __proto.setSpriteWH=function(sprite){
289 | this._textureWidth=sprite.width;
290 | this._textureHeight=sprite.height;
291 | }
292 |
293 | __proto.setValue=function(shader){
294 | shader.u_offsetX=this.data.offX;
295 | shader.u_offsetY=-this.data.offY;
296 | shader.u_strength=1.0;
297 | shader.u_blurX=this.data.blur;
298 | shader.u_blurY=this.data.blur;
299 | shader.u_textW=this._textureWidth;
300 | shader.u_textH=this._textureHeight;
301 | shader.u_color=this.data.getColor();
302 | }
303 |
304 | __getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.GLOW*/0x08;});
305 | GlowFilterActionGL.tmpTarget=function(scope,sprite,context,x,y){
306 | var b=scope.getValue("bounds");
307 | var out=scope.getValue("out");
308 | out.end();
309 | var tmpTarget=RenderTarget2D.create(b.width,b.height);
310 | tmpTarget.start();
311 | var color=scope.getValue("color");
312 | if (color){
313 | tmpTarget.clear(color[0],color[1],color[2],0);
314 | }
315 | scope.addValue("tmpTarget",tmpTarget);
316 | }
317 |
318 | GlowFilterActionGL.startOut=function(scope,sprite,context,x,y){
319 | var tmpTarget=scope.getValue("tmpTarget");
320 | tmpTarget.end();
321 | var out=scope.getValue("out");
322 | out.start();
323 | var color=scope.getValue("color");
324 | if (color){
325 | out.clear(color[0],color[1],color[2],0);
326 | }
327 | }
328 |
329 | GlowFilterActionGL.recycleTarget=function(scope,sprite,context,x,y){
330 | var src=scope.getValue("src");
331 | var tmpTarget=scope.getValue("tmpTarget");
332 | tmpTarget.recycle();
333 | }
334 |
335 | return GlowFilterActionGL;
336 | })(FilterActionGL)
337 |
338 |
339 | Laya.__init([WebGLFilter]);
340 | })(window,document,Laya);
341 |
--------------------------------------------------------------------------------
/bin/libs/min/laya.d3Plugin.min.js:
--------------------------------------------------------------------------------
1 | !function(t,i,e){var n=(e.un,e.uns,e.static,e.class),r=e.getset,h=(e.__newvec,laya.d3.component.Component3D);laya.d3.core.MeshTerrainSprite3D,laya.d3.core.Sprite3D,function(t){function i(){this._meshTerrainSprite3D=null,this._finder=null,this._setting=null,this.grid=null,i.__super.call(this)}n(i,"laya.d3.component.PathFind",t);var e=i.prototype;e._load=function(i){if(!(i instanceof laya.d3.core.MeshTerrainSprite3D))throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");t.prototype._load.call(this,i),this._meshTerrainSprite3D=i},e.findPath=function(t,i,e,n){var r=this._meshTerrainSprite3D.minX,h=this._meshTerrainSprite3D.minZ,a=this._meshTerrainSprite3D.width/this.grid.width,s=this._meshTerrainSprite3D.depth/this.grid.height,o=a/2,d=s/2,l=Math.floor((t-r)/a),g=Math.floor((i-h)/s),f=Math.floor((e-r)/a),c=Math.floor((n-h)/s),p=this.grid.width-1,u=this.grid.height-1;l>p&&(l=p),g>u&&(g=u),l<0&&(l=0),g<0&&(g=0),f>p&&(f=p),c>u&&(c=u),f<0&&(f=0),c<0&&(c=0);var _=this._finder.findPath(l,g,f,c,this.grid);this.grid.reset();for(var m=1;m<_.length-1;m++){var D=_[m];D[0]=D[0]*a+o+r,D[1]=D[1]*s+d+h}return 1==_.length?(_[0][0]=e,_[0][1]=e):_.length>1&&(_[0][0]=t,_[0][1]=i,_[_.length-1][0]=e,_[_.length-1][1]=n),_},r(0,e,"setting",function(){return this._setting},function(t){t&&(this._finder=new PathFinding.finders.AStarFinder(t)),this._setting=t}),i}(h)}(window,document,Laya);
--------------------------------------------------------------------------------
/bin/libs/min/laya.filter.min.js:
--------------------------------------------------------------------------------
1 | !function(t,e,i){var r=(i.un,i.uns,i.static,i.class),a=i.getset,n=(i.__newvec,laya.webgl.canvas.BlendMode),l=(laya.utils.Browser,laya.utils.Color),s=laya.filters.ColorFilterAction,o=laya.filters.webgl.ColorFilterActionGL,u=laya.filters.Filter,c=laya.filters.webgl.FilterActionGL,h=laya.maths.Matrix,d=(laya.maths.Rectangle,laya.renders.Render),f=(laya.renders.RenderContext,laya.webgl.resource.RenderTarget2D),_=laya.utils.RunDriver,g=(laya.webgl.shader.d2.ShaderDefines2D,laya.display.Sprite,laya.webgl.submit.SubmitCMD),y=laya.resource.Texture,b=laya.webgl.shader.d2.value.Value2D,p=function(){function t(){this.data=null}r(t,"laya.filters.FilterAction");var e=t.prototype;return i.imps(e,{"laya.filters.IFilterAction":!0}),e.apply=function(t){return null},t}(),w=function(){function t(){}return r(t,"laya.filters.WebGLFilter"),t.enable=function(){t.isInit||(t.isInit=!0,d.isWebGL&&(_.createFilterAction=function(t){var e;switch(t){case 32:e=new o;break;case 16:e=new v;break;case 8:e=new x}return e}))},t.isInit=!1,t.__init$=function(){_.createFilterAction=function(t){var e;switch(t){case 16:e=new p;break;case 8:e=new p;break;case 32:e=new s}return e}},t}(),v=(function(t){function e(t){this.strength=NaN,e.__super.call(this),void 0===t&&(t=4),d.isWebGL&&w.enable(),this.strength=t,this._action=_.createFilterAction(16),this._action.data=this}r(e,"laya.filters.BlurFilter",t);var i=e.prototype;i.callNative=function(t){t.conchModel&&t.conchModel.blurFilter&&t.conchModel.blurFilter(this.strength)},a(0,i,"action",function(){return this._action}),a(0,i,"type",function(){return 16}),e}(u),function(t){function e(t,i,r,a){this._color=null,e.__super.call(this),this._elements=new Float32Array(9),void 0===i&&(i=4),void 0===r&&(r=6),void 0===a&&(a=6),d.isWebGL&&w.enable(),this._color=new l(t),this.blur=Math.min(i,20),this.offX=r,this.offY=a,this._action=_.createFilterAction(8),this._action.data=this}r(e,"laya.filters.GlowFilter",t);var i=e.prototype;i.getColor=function(){return this._color._color},i.callNative=function(t){t.conchModel&&t.conchModel.glowFilter&&t.conchModel.glowFilter(this._color.strColor,this._elements[4],this._elements[5],this._elements[6])},a(0,i,"type",function(){return 8}),a(0,i,"action",function(){return this._action}),a(0,i,"offY",function(){return this._elements[6]},function(t){this._elements[6]=t}),a(0,i,"offX",function(){return this._elements[5]},function(t){this._elements[5]=t}),a(0,i,"blur",function(){return this._elements[4]},function(t){this._elements[4]=t}),e}(u),function(t){function e(){this.data=null,e.__super.call(this)}r(e,"laya.filters.webgl.BlurFilterActionGL",t);var i=e.prototype;return i.setValueMix=function(t){t.defines.add(this.data.type)},i.apply3d=function(t,e,i,r,a){var n=t.getValue("bounds"),l=b.create(1,0);l.setFilters([this.data]),h.EMPTY.identity(),i.ctx.drawTarget(t,0,0,n.width,n.height,h.EMPTY,"src",l),l.setFilters(null)},i.setValue=function(t){t.strength=this.data.strength},a(0,i,"typeMix",function(){return 16}),e}(c)),x=function(t){function e(){this.data=null,this._initKey=!1,this._textureWidth=0,this._textureHeight=0,e.__super.call(this)}r(e,"laya.filters.webgl.GlowFilterActionGL",t);var l=e.prototype;return i.imps(l,{"laya.filters.IFilterActionGL":!0}),l.setValueMix=function(t){},l.apply3d=function(t,i,r,a,l){var s=t.getValue("bounds");t.addValue("color",this.data.getColor());var o=s.width,u=s.height;this._textureWidth=o,this._textureHeight=u;var c=g.create([t,i,r,0,0],e.tmpTarget);r.ctx.addRenderObject(c);var d,f=h.TEMP;return f.identity(),d=b.create(1,0),d.setFilters([this.data]),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"src",d,null,n.TOINT.overlay),c=g.create([t,i,r,0,0],e.startOut),r.ctx.addRenderObject(c),d=b.create(1,0),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"tmpTarget",d,y.INV_UV,n.TOINT.overlay),d=b.create(1,0),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"src",d),c=g.create([t,i,r,0,0],e.recycleTarget),r.ctx.addRenderObject(c),null},l.setSpriteWH=function(t){this._textureWidth=t.width,this._textureHeight=t.height},l.setValue=function(t){t.u_offsetX=this.data.offX,t.u_offsetY=-this.data.offY,t.u_strength=1,t.u_blurX=this.data.blur,t.u_blurY=this.data.blur,t.u_textW=this._textureWidth,t.u_textH=this._textureHeight,t.u_color=this.data.getColor()},a(0,l,"typeMix",function(){return 8}),e.tmpTarget=function(t,e,i,r,a){var n=t.getValue("bounds");t.getValue("out").end();var l=f.create(n.width,n.height);l.start();var s=t.getValue("color");s&&l.clear(s[0],s[1],s[2],0),t.addValue("tmpTarget",l)},e.startOut=function(t,e,i,r,a){t.getValue("tmpTarget").end();var n=t.getValue("out");n.start();var l=t.getValue("color");l&&n.clear(l[0],l[1],l[2],0)},e.recycleTarget=function(t,e,i,r,a){t.getValue("src");t.getValue("tmpTarget").recycle()},e}(c);i.__init([w])}(window,document,Laya);
--------------------------------------------------------------------------------
/bin/res/BackGround.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/BackGround.png
--------------------------------------------------------------------------------
/bin/res/BackGround.png.bak.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/BackGround.png.bak.png
--------------------------------------------------------------------------------
/bin/res/atlas/.rec:
--------------------------------------------------------------------------------
1 | D .
2 | D comp
3 | P D12221A9 bg.png
4 | P 9401CC40 blank.png
5 | P B03390E5 btn_close.png
6 | P 1F3929EA button.png
7 | P 6CC6DF97 checkbox.png
8 | P FB94CCF2 clip_num.png
9 | P F7B6B7D7 clip_selectBox.png
10 | P 755271AE clip_tree_arrow.png
11 | P 859FD34C clip_tree_folder.png
12 | P A0E3B8F9 combobox.png
13 | P 9EDA959E hscroll$bar.png
14 | P 1AB768D4 hscroll$down.png
15 | P 685261D3 hscroll$up.png
16 | P 274B8076 hscroll.png
17 | P E466EB1C hslider$bar.png
18 | P C4BECA54 hslider.png
19 | P 5EDC128C html.png
20 | P ACFFCCCF image.png
21 | P 5EDC128C label.png
22 | P 5EDC128C linkbutton.png
23 | P 9E4DD730 progress$bar.png
24 | P 3FD78E12 progress.png
25 | P BF898D6A radio.png
26 | P BF898D6A radiogroup.png
27 | P 8CFD9D35 tab.png
28 | P BDA71F88 textarea.png
29 | P BDA71F88 textinput.png
30 | P 52107B89 vscroll$bar.png
31 | P E26B933E vscroll$down.png
32 | P B9680947 vscroll$up.png
33 | P 7E990267 vscroll.png
34 | P E466EB1C vslider$bar.png
35 | P 2BFF7046 vslider.png
36 |
--------------------------------------------------------------------------------
/bin/res/atlas/comp.atlas:
--------------------------------------------------------------------------------
1 | {"frames":{"image.png":{"frame":{"x":0,"y":0,"w":150,"h":250,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":150,"h":250}},"bg.png":{"frame":{"x":152,"y":0,"w":100,"h":79,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":79}},"clip_num.png":{"frame":{"x":0,"y":252,"w":240,"h":27,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":240,"h":27}},"combobox.png":{"frame":{"x":152,"y":81,"w":91,"h":69,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":69}},"tab.png":{"frame":{"x":242,"y":152,"w":70,"h":78,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":70,"h":78}},"button.png":{"frame":{"x":152,"y":152,"w":75,"h":69,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":75,"h":69}},"clip_selectBox.png":{"frame":{"x":245,"y":81,"w":100,"h":40,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":40}},"html.png":{"frame":{"x":245,"y":123,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"label.png":{"frame":{"x":152,"y":232,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"linkbutton.png":{"frame":{"x":242,"y":252,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"textarea.png":{"frame":{"x":242,"y":272,"w":91,"h":23,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":23}},"textinput.png":{"frame":{"x":254,"y":0,"w":91,"h":23,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":23}},"btn_close.png":{"frame":{"x":335,"y":272,"w":28,"h":60,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":28,"h":60}},"hscroll$bar.png":{"frame":{"x":314,"y":143,"w":21,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":21,"h":51}},"vscroll$bar.png":{"frame":{"x":337,"y":143,"w":17,"h":63,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":63}},"hscroll$down.png":{"frame":{"x":314,"y":196,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"hscroll$up.png":{"frame":{"x":347,"y":0,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"vscroll$down.png":{"frame":{"x":347,"y":53,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"vscroll$up.png":{"frame":{"x":254,"y":25,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"clip_tree_folder.png":{"frame":{"x":273,"y":25,"w":16,"h":48,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":16,"h":48}},"progress$bar.png":{"frame":{"x":291,"y":25,"w":50,"h":14,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":50,"h":14}},"progress.png":{"frame":{"x":291,"y":41,"w":50,"h":14,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":50,"h":14}},"hslider.png":{"frame":{"x":0,"y":281,"w":100,"h":6,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":6}},"vslider.png":{"frame":{"x":356,"y":143,"w":6,"h":100,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":6,"h":100}},"checkbox.png":{"frame":{"x":333,"y":208,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"radio.png":{"frame":{"x":102,"y":281,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"radiogroup.png":{"frame":{"x":0,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"hslider$bar.png":{"frame":{"x":16,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"vslider$bar.png":{"frame":{"x":32,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"hscroll.png":{"frame":{"x":274,"y":232,"w":33,"h":17,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":33,"h":17}},"vscroll.png":{"frame":{"x":48,"y":289,"w":17,"h":33,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":33}},"clip_tree_arrow.png":{"frame":{"x":67,"y":289,"w":14,"h":28,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":28}},"blank.png":{"frame":{"x":347,"y":106,"w":10,"h":10,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":10,"h":10}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"comp.png","prefix":"comp\/","md5":"054dc388a3e4a50802406d800fb20f7d"}}
2 |
--------------------------------------------------------------------------------
/bin/res/atlas/comp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/atlas/comp.png
--------------------------------------------------------------------------------
/bin/res/atlas/rec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/atlas/rec
--------------------------------------------------------------------------------
/bin/res/bird/bird_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/bird/bird_1.png
--------------------------------------------------------------------------------
/bin/res/bird/bird_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/bird/bird_2.png
--------------------------------------------------------------------------------
/bin/res/bird/bird_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/bird/bird_3.png
--------------------------------------------------------------------------------
/bin/res/bird/bird_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/bird/bird_4.png
--------------------------------------------------------------------------------
/bin/res/cat_sleep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/cat_sleep.png
--------------------------------------------------------------------------------
/bin/res/effect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/effect.png
--------------------------------------------------------------------------------
/bin/res/floor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/floor.png
--------------------------------------------------------------------------------
/bin/res/hp/en_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/hp/en_bar.png
--------------------------------------------------------------------------------
/bin/res/hp/hp_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/hp/hp_bar.png
--------------------------------------------------------------------------------
/bin/res/hp/hp_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/hp/hp_bg.png
--------------------------------------------------------------------------------
/bin/res/item/item_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/item/item_1.png
--------------------------------------------------------------------------------
/bin/res/item/item_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/item/item_2.png
--------------------------------------------------------------------------------
/bin/res/item/item_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/item/item_3.png
--------------------------------------------------------------------------------
/bin/res/item/item_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/item/item_4.png
--------------------------------------------------------------------------------
/bin/res/m_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/m_background.png
--------------------------------------------------------------------------------
/bin/res/particle/heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/particle/heart.png
--------------------------------------------------------------------------------
/bin/res/particle/particle.part:
--------------------------------------------------------------------------------
1 | {
2 | "textureName":"res/particle/heart.png",
3 | "textureCount":1,
4 | "useEndRadian":true,
5 | "positionVariance":{
6 | "2":0,
7 | "1":2,
8 | "0":2
9 | },
10 | "minVerticalVelocity":0.1,
11 | "minVerticalStartRadian":-0,
12 | "minVerticalEndRadian":-6.283185307179586,
13 | "minStartSize":10,
14 | "minStartRadius":96,
15 | "minRotateSpeed":-2,
16 | "minHorizontalVelocity":0.1,
17 | "minHorizontalStartRadian":-0,
18 | "minHorizontalEndRadian":-6.283185307179586,
19 | "minEndSize":12,
20 | "minEndRadius":96,
21 | "minStartColor":{
22 | "3":0.6000000238418579,
23 | "2":1,
24 | "1":0.30000001192092896,
25 | "0":1
26 | },
27 | "minEndColor":{
28 | "3":1,
29 | "2":1,
30 | "1":0,
31 | "0":0
32 | },
33 | "maxVerticalVelocity":0.1,
34 | "maxVerticalStartRadian":0,
35 | "maxVerticalEndRadian":6.283185307179586,
36 | "maxStartSize":20,
37 | "maxStartRadius":96,
38 | "maxRotateSpeed":2,
39 | "maxPartices":1600,
40 | "maxHorizontalVelocity":0.1,
41 | "maxHorizontalStartRadian":0,
42 | "maxHorizontalEndRadian":6.283185307179586,
43 | "maxEndSize":40,
44 | "maxEndRadius":96,
45 | "maxStartColor":{
46 | "3":1,
47 | "2":0,
48 | "1":0.30000001192092896,
49 | "0":1
50 | },
51 | "maxEndColor":{
52 | "3":1,
53 | "2":1,
54 | "1":0,
55 | "0":0
56 | },
57 | "gravity":{
58 | "2":0,
59 | "1":2,
60 | "0":0
61 | },
62 | "endVelocity":1,
63 | "emitterVelocitySensitivity":1,
64 | "duration":6,
65 | "colorComponentInter":true,
66 | "blendState":1,
67 | "ageAddScale":1
68 | }
--------------------------------------------------------------------------------
/bin/res/player.atlas:
--------------------------------------------------------------------------------
1 | {"frames":{"chara_01.png":{"frame":{"x":0,"y":0,"w":45,"h":71,"idx":0},"spriteSourceSize":{"x":27,"y":23},"sourceSize":{"w":96,"h":96}},"chara_02.png":{"frame":{"x":47,"y":0,"w":52,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_03.png":{"frame":{"x":0,"y":73,"w":44,"h":73,"idx":0},"spriteSourceSize":{"x":28,"y":21},"sourceSize":{"w":96,"h":96}},"chara_04.png":{"frame":{"x":101,"y":0,"w":50,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_05.png":{"frame":{"x":46,"y":73,"w":53,"h":61,"idx":0},"spriteSourceSize":{"x":22,"y":16},"sourceSize":{"w":96,"h":96}},"chara_06.png":{"frame":{"x":153,"y":0,"w":52,"h":61,"idx":0},"spriteSourceSize":{"x":23,"y":16},"sourceSize":{"w":96,"h":96}},"chara_07.png":{"frame":{"x":207,"y":0,"w":54,"h":60,"idx":0},"spriteSourceSize":{"x":21,"y":17},"sourceSize":{"w":96,"h":96}},"chara_08.png":{"frame":{"x":101,"y":73,"w":54,"h":61,"idx":0},"spriteSourceSize":{"x":21,"y":16},"sourceSize":{"w":96,"h":96}},"chara_09.png":{"frame":{"x":0,"y":148,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":13},"sourceSize":{"w":96,"h":96}},"chara_10.png":{"frame":{"x":67,"y":136,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":21,"y":12},"sourceSize":{"w":96,"h":96}},"chara_11.png":{"frame":{"x":157,"y":63,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":11},"sourceSize":{"w":96,"h":96}},"chara_12.png":{"frame":{"x":224,"y":62,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":18,"y":13},"sourceSize":{"w":96,"h":96}},"chara_13.png":{"frame":{"x":127,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_14.png":{"frame":{"x":181,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_15.png":{"frame":{"x":235,"y":139,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_16.png":{"frame":{"x":235,"y":205,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"player.png","prefix":"","md5":"6cecff3fca089fbffaec581fc54f47fc"}}
2 |
--------------------------------------------------------------------------------
/bin/res/player.json:
--------------------------------------------------------------------------------
1 | {"frames":{"chara_01.png":{"frame":{"x":0,"y":0,"w":45,"h":71,"idx":0},"spriteSourceSize":{"x":27,"y":23},"sourceSize":{"w":96,"h":96}},"chara_02.png":{"frame":{"x":47,"y":0,"w":52,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_03.png":{"frame":{"x":0,"y":73,"w":44,"h":73,"idx":0},"spriteSourceSize":{"x":28,"y":21},"sourceSize":{"w":96,"h":96}},"chara_04.png":{"frame":{"x":101,"y":0,"w":50,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_05.png":{"frame":{"x":46,"y":73,"w":53,"h":61,"idx":0},"spriteSourceSize":{"x":22,"y":16},"sourceSize":{"w":96,"h":96}},"chara_06.png":{"frame":{"x":153,"y":0,"w":52,"h":61,"idx":0},"spriteSourceSize":{"x":23,"y":16},"sourceSize":{"w":96,"h":96}},"chara_07.png":{"frame":{"x":207,"y":0,"w":54,"h":60,"idx":0},"spriteSourceSize":{"x":21,"y":17},"sourceSize":{"w":96,"h":96}},"chara_08.png":{"frame":{"x":101,"y":73,"w":54,"h":61,"idx":0},"spriteSourceSize":{"x":21,"y":16},"sourceSize":{"w":96,"h":96}},"chara_09.png":{"frame":{"x":0,"y":148,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":13},"sourceSize":{"w":96,"h":96}},"chara_10.png":{"frame":{"x":67,"y":136,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":21,"y":12},"sourceSize":{"w":96,"h":96}},"chara_11.png":{"frame":{"x":157,"y":63,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":11},"sourceSize":{"w":96,"h":96}},"chara_12.png":{"frame":{"x":224,"y":62,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":18,"y":13},"sourceSize":{"w":96,"h":96}},"chara_13.png":{"frame":{"x":127,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_14.png":{"frame":{"x":181,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_15.png":{"frame":{"x":235,"y":139,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_16.png":{"frame":{"x":235,"y":205,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"player.png","prefix":"","md5":"6cecff3fca089fbffaec581fc54f47fc"}}
2 |
--------------------------------------------------------------------------------
/bin/res/player.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player.png
--------------------------------------------------------------------------------
/bin/res/player/chara_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_01.png
--------------------------------------------------------------------------------
/bin/res/player/chara_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_02.png
--------------------------------------------------------------------------------
/bin/res/player/chara_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_03.png
--------------------------------------------------------------------------------
/bin/res/player/chara_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_04.png
--------------------------------------------------------------------------------
/bin/res/player/chara_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_05.png
--------------------------------------------------------------------------------
/bin/res/player/chara_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_06.png
--------------------------------------------------------------------------------
/bin/res/player/chara_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_07.png
--------------------------------------------------------------------------------
/bin/res/player/chara_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_08.png
--------------------------------------------------------------------------------
/bin/res/player/chara_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_09.png
--------------------------------------------------------------------------------
/bin/res/player/chara_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_10.png
--------------------------------------------------------------------------------
/bin/res/player/chara_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_11.png
--------------------------------------------------------------------------------
/bin/res/player/chara_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_12.png
--------------------------------------------------------------------------------
/bin/res/player/chara_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_13.png
--------------------------------------------------------------------------------
/bin/res/player/chara_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_14.png
--------------------------------------------------------------------------------
/bin/res/player/chara_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_15.png
--------------------------------------------------------------------------------
/bin/res/player/chara_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/player/chara_16.png
--------------------------------------------------------------------------------
/bin/res/rec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/rec
--------------------------------------------------------------------------------
/bin/res/spiritEffect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/spiritEffect.png
--------------------------------------------------------------------------------
/bin/res/tree0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/tree0.png
--------------------------------------------------------------------------------
/bin/res/wav/BG.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/BG.wav
--------------------------------------------------------------------------------
/bin/res/wav/DecelerationCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/DecelerationCounting.wav
--------------------------------------------------------------------------------
/bin/res/wav/InvincibleCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/InvincibleCounting.wav
--------------------------------------------------------------------------------
/bin/res/wav/Invincible_end.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/Invincible_end.wav
--------------------------------------------------------------------------------
/bin/res/wav/Invincible_start.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/Invincible_start.wav
--------------------------------------------------------------------------------
/bin/res/wav/LowerSpeed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/LowerSpeed.wav
--------------------------------------------------------------------------------
/bin/res/wav/StarCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/bin/res/wav/StarCounting.wav
--------------------------------------------------------------------------------
/bin/unpack.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=759670
3 | // for the documentation about the jsconfig.json format
4 | "compilerOptions": {
5 | "target": "es5"
6 | },
7 | "exclude": [
8 | "node_modules",
9 | "bower_components",
10 | "jspm_packages",
11 | "tmp",
12 | "temp",
13 | "bin"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/laya/.laya:
--------------------------------------------------------------------------------
1 | PathFinding
类用于创建寻路。
9 | */
10 | //class laya.d3.component.PathFind extends laya.d3.component.Component3D
11 | var PathFind=(function(_super){
12 | function PathFind(){
13 | this._meshTerrainSprite3D=null;
14 | this._finder=null;
15 | this._setting=null;
16 | this.grid=null;
17 | PathFind.__super.call(this);
18 | }
19 |
20 | __class(PathFind,'laya.d3.component.PathFind',_super);
21 | var __proto=PathFind.prototype;
22 | /**
23 | *@private
24 | *初始化载入蒙皮动画组件。
25 | *@param owner 所属精灵对象。
26 | */
27 | __proto._load=function(owner){
28 | if (! (owner instanceof laya.d3.core.MeshTerrainSprite3D ))
29 | throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");
30 | _super.prototype._load.call(this,owner);
31 | this._meshTerrainSprite3D=owner;
32 | }
33 |
34 | /**
35 | *寻找路径。
36 | *@param startX 开始X。
37 | *@param startZ 开始Z。
38 | *@param endX 结束X。
39 | *@param endZ 结束Z。
40 | *@return 路径。
41 | */
42 | __proto.findPath=function(startX,startZ,endX,endZ){
43 | var minX=this._meshTerrainSprite3D.minX;
44 | var minZ=this._meshTerrainSprite3D.minZ;
45 | var cellX=this._meshTerrainSprite3D.width / this.grid.width;
46 | var cellZ=this._meshTerrainSprite3D.depth / this.grid.height;
47 | var halfCellX=cellX / 2;
48 | var halfCellZ=cellZ / 2;
49 | var gridStartX=Math.floor((startX-minX)/ cellX);
50 | var gridStartZ=Math.floor((startZ-minZ)/ cellZ);
51 | var gridEndX=Math.floor((endX-minX)/ cellX);
52 | var gridEndZ=Math.floor((endZ-minZ)/ cellZ);
53 | var boundWidth=this.grid.width-1;
54 | var boundHeight=this.grid.height-1;
55 | (gridStartX > boundWidth)&& (gridStartX=boundWidth);
56 | (gridStartZ > boundHeight)&& (gridStartZ=boundHeight);
57 | (gridStartX < 0)&& (gridStartX=0);
58 | (gridStartZ < 0)&& (gridStartZ=0);
59 | (gridEndX > boundWidth)&& (gridEndX=boundWidth);
60 | (gridEndZ > boundHeight)&& (gridEndZ=boundHeight);
61 | (gridEndX < 0)&& (gridEndX=0);
62 | (gridEndZ < 0)&& (gridEndZ=0);
63 | var path=this._finder.findPath(gridStartX,gridStartZ,gridEndX,gridEndZ,this.grid);
64 | this.grid.reset();
65 | for (var i=1;i < path.length-1;i++){
66 | var gridPos=path[i];
67 | gridPos[0]=gridPos[0] *cellX+halfCellX+minX;
68 | gridPos[1]=gridPos[1] *cellZ+halfCellZ+minZ;
69 | }
70 | if (path.length==1){
71 | path[0][0]=endX;
72 | path[0][1]=endX;
73 | }else if (path.length > 1){
74 | path[0][0]=startX;
75 | path[0][1]=startZ;
76 | path[path.length-1][0]=endX;
77 | path[path.length-1][1]=endZ;
78 | }
79 | return path;
80 | }
81 |
82 | /**
83 | *设置寻路设置。
84 | *@param value 寻路设置。
85 | */
86 | /**
87 | *获取寻路设置。
88 | *@return 寻路设置。
89 | */
90 | __getset(0,__proto,'setting',function(){
91 | return this._setting;
92 | },function(value){
93 | (value)&& (this._finder=new PathFinding.finders.AStarFinder(value));
94 | this._setting=value;
95 | });
96 |
97 | return PathFind;
98 | })(Component3D)
99 |
100 |
101 |
102 | })(window,document,Laya);
103 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/libs/laya.filter.js:
--------------------------------------------------------------------------------
1 |
2 | (function(window,document,Laya){
3 | var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;
4 |
5 | var BlendMode=laya.webgl.canvas.BlendMode,Browser=laya.utils.Browser,Color=laya.utils.Color,ColorFilterAction=laya.filters.ColorFilterAction;
6 | var ColorFilterActionGL=laya.filters.webgl.ColorFilterActionGL,Filter=laya.filters.Filter,FilterActionGL=laya.filters.webgl.FilterActionGL;
7 | var Matrix=laya.maths.Matrix,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext;
8 | var RenderTarget2D=laya.webgl.resource.RenderTarget2D,RunDriver=laya.utils.RunDriver,ShaderDefines2D=laya.webgl.shader.d2.ShaderDefines2D;
9 | var Sprite=laya.display.Sprite,SubmitCMD=laya.webgl.submit.SubmitCMD,Texture=laya.resource.Texture,Value2D=laya.webgl.shader.d2.value.Value2D;
10 | /**
11 | *默认的FILTER,什么都不做
12 | *@private
13 | */
14 | //class laya.filters.FilterAction
15 | var FilterAction=(function(){
16 | function FilterAction(){
17 | this.data=null;
18 | }
19 |
20 | __class(FilterAction,'laya.filters.FilterAction');
21 | var __proto=FilterAction.prototype;
22 | Laya.imps(__proto,{"laya.filters.IFilterAction":true})
23 | __proto.apply=function(data){
24 | return null;
25 | }
26 |
27 | return FilterAction;
28 | })()
29 |
30 |
31 | /**
32 | *@private
33 | */
34 | //class laya.filters.WebGLFilter
35 | var WebGLFilter=(function(){
36 | function WebGLFilter(){};
37 | __class(WebGLFilter,'laya.filters.WebGLFilter');
38 | WebGLFilter.enable=function(){
39 | if (WebGLFilter.isInit)return;
40 | WebGLFilter.isInit=true;
41 | if (!Render.isWebGL)return;
42 | RunDriver.createFilterAction=function (type){
43 | var action;
44 | switch (type){
45 | case /*laya.filters.Filter.COLOR*/0x20:
46 | action=new ColorFilterActionGL();
47 | break ;
48 | case /*laya.filters.Filter.BLUR*/0x10:
49 | action=new BlurFilterActionGL();
50 | break ;
51 | case /*laya.filters.Filter.GLOW*/0x08:
52 | action=new GlowFilterActionGL();
53 | break ;
54 | }
55 | return action;
56 | }
57 | }
58 |
59 | WebGLFilter.isInit=false;
60 | WebGLFilter.__init$=function(){
61 | BlurFilterActionGL;
62 | ColorFilterActionGL;
63 | GlowFilterActionGL;
64 | Render;
65 | RunDriver;{
66 | RunDriver.createFilterAction=function (type){
67 | var action;
68 | switch (type){
69 | case /*laya.filters.Filter.BLUR*/0x10:
70 | action=new FilterAction();
71 | break ;
72 | case /*laya.filters.Filter.GLOW*/0x08:
73 | action=new FilterAction();
74 | break ;
75 | case /*laya.filters.Filter.COLOR*/0x20:
76 | action=new ColorFilterAction();
77 | break ;
78 | }
79 | return action;
80 | }
81 | }
82 | }
83 |
84 | return WebGLFilter;
85 | })()
86 |
87 |
88 | /**
89 | *模糊滤镜
90 | */
91 | //class laya.filters.BlurFilter extends laya.filters.Filter
92 | var BlurFilter=(function(_super){
93 | function BlurFilter(strength){
94 | this.strength=NaN;
95 | BlurFilter.__super.call(this);
96 | (strength===void 0)&& (strength=4);
97 | if (Render.isWebGL)WebGLFilter.enable();
98 | this.strength=strength;
99 | this._action=RunDriver.createFilterAction(0x10);
100 | this._action.data=this;
101 | }
102 |
103 | __class(BlurFilter,'laya.filters.BlurFilter',_super);
104 | var __proto=BlurFilter.prototype;
105 | /**
106 | *@private 通知微端
107 | */
108 | __proto.callNative=function(sp){
109 | sp.conchModel &&sp.conchModel.blurFilter&&sp.conchModel.blurFilter(this.strength);
110 | }
111 |
112 | /**
113 | *@private
114 | *当前滤镜对应的操作器
115 | */
116 | __getset(0,__proto,'action',function(){
117 | return this._action;
118 | });
119 |
120 | /**
121 | *@private
122 | *当前滤镜的类型
123 | */
124 | __getset(0,__proto,'type',function(){
125 | return 0x10;
126 | });
127 |
128 | return BlurFilter;
129 | })(Filter)
130 |
131 |
132 | /**
133 | *发光滤镜(也可以当成阴影滤使用)
134 | */
135 | //class laya.filters.GlowFilter extends laya.filters.Filter
136 | var GlowFilter=(function(_super){
137 | function GlowFilter(color,blur,offX,offY){
138 | this._color=null;
139 | GlowFilter.__super.call(this);
140 | this._elements=new Float32Array(9);
141 | (blur===void 0)&& (blur=4);
142 | (offX===void 0)&& (offX=6);
143 | (offY===void 0)&& (offY=6);
144 | if (Render.isWebGL){
145 | WebGLFilter.enable();
146 | }
147 | this._color=new Color(color);
148 | this.blur=Math.min(blur,20);
149 | this.offX=offX;
150 | this.offY=offY;
151 | this._action=RunDriver.createFilterAction(0x08);
152 | this._action.data=this;
153 | }
154 |
155 | __class(GlowFilter,'laya.filters.GlowFilter',_super);
156 | var __proto=GlowFilter.prototype;
157 | /**@private */
158 | __proto.getColor=function(){
159 | return this._color._color;
160 | }
161 |
162 | /**
163 | *@private 通知微端
164 | */
165 | __proto.callNative=function(sp){
166 | sp.conchModel &&sp.conchModel.glowFilter&&sp.conchModel.glowFilter(this._color.strColor,this._elements[4],this._elements[5],this._elements[6]);
167 | }
168 |
169 | /**
170 | *@private
171 | *滤镜类型
172 | */
173 | __getset(0,__proto,'type',function(){
174 | return 0x08;
175 | });
176 |
177 | /**@private */
178 | __getset(0,__proto,'action',function(){
179 | return this._action;
180 | });
181 |
182 | /**@private */
183 | /**@private */
184 | __getset(0,__proto,'offY',function(){
185 | return this._elements[6];
186 | },function(value){
187 | this._elements[6]=value;
188 | });
189 |
190 | /**@private */
191 | /**@private */
192 | __getset(0,__proto,'offX',function(){
193 | return this._elements[5];
194 | },function(value){
195 | this._elements[5]=value;
196 | });
197 |
198 | /**@private */
199 | /**@private */
200 | __getset(0,__proto,'blur',function(){
201 | return this._elements[4];
202 | },function(value){
203 | this._elements[4]=value;
204 | });
205 |
206 | return GlowFilter;
207 | })(Filter)
208 |
209 |
210 | /**
211 | *@private
212 | */
213 | //class laya.filters.webgl.BlurFilterActionGL extends laya.filters.webgl.FilterActionGL
214 | var BlurFilterActionGL=(function(_super){
215 | function BlurFilterActionGL(){
216 | this.data=null;
217 | BlurFilterActionGL.__super.call(this);
218 | }
219 |
220 | __class(BlurFilterActionGL,'laya.filters.webgl.BlurFilterActionGL',_super);
221 | var __proto=BlurFilterActionGL.prototype;
222 | __proto.setValueMix=function(shader){
223 | shader.defines.add(this.data.type);
224 | var o=shader;
225 | }
226 |
227 | __proto.apply3d=function(scope,sprite,context,x,y){
228 | var b=scope.getValue("bounds");
229 | var shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
230 | shaderValue.setFilters([this.data]);
231 | var tMatrix=Matrix.EMPTY;
232 | tMatrix.identity();
233 | context.ctx.drawTarget(scope,0,0,b.width,b.height,Matrix.EMPTY,"src",shaderValue);
234 | shaderValue.setFilters(null);
235 | }
236 |
237 | __proto.setValue=function(shader){
238 | shader.strength=this.data.strength;
239 | }
240 |
241 | __getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.BLUR*/0x10;});
242 | return BlurFilterActionGL;
243 | })(FilterActionGL)
244 |
245 |
246 | /**
247 | *@private
248 | */
249 | //class laya.filters.webgl.GlowFilterActionGL extends laya.filters.webgl.FilterActionGL
250 | var GlowFilterActionGL=(function(_super){
251 | function GlowFilterActionGL(){
252 | this.data=null;
253 | this._initKey=false;
254 | this._textureWidth=0;
255 | this._textureHeight=0;
256 | GlowFilterActionGL.__super.call(this);
257 | }
258 |
259 | __class(GlowFilterActionGL,'laya.filters.webgl.GlowFilterActionGL',_super);
260 | var __proto=GlowFilterActionGL.prototype;
261 | Laya.imps(__proto,{"laya.filters.IFilterActionGL":true})
262 | __proto.setValueMix=function(shader){}
263 | __proto.apply3d=function(scope,sprite,context,x,y){
264 | var b=scope.getValue("bounds");
265 | scope.addValue("color",this.data.getColor());
266 | var w=b.width,h=b.height;
267 | this._textureWidth=w;
268 | this._textureHeight=h;
269 | var submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.tmpTarget);
270 | context.ctx.addRenderObject(submit);
271 | var shaderValue;
272 | var mat=Matrix.TEMP;
273 | mat.identity();
274 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
275 | shaderValue.setFilters([this.data]);
276 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"src",shaderValue,null,BlendMode.TOINT.overlay);
277 | submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.startOut);
278 | context.ctx.addRenderObject(submit);
279 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
280 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"tmpTarget",shaderValue,Texture.INV_UV,BlendMode.TOINT.overlay);
281 | shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);
282 | context.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,"src",shaderValue);
283 | submit=SubmitCMD.create([scope,sprite,context,0,0],GlowFilterActionGL.recycleTarget);
284 | context.ctx.addRenderObject(submit);
285 | return null;
286 | }
287 |
288 | __proto.setSpriteWH=function(sprite){
289 | this._textureWidth=sprite.width;
290 | this._textureHeight=sprite.height;
291 | }
292 |
293 | __proto.setValue=function(shader){
294 | shader.u_offsetX=this.data.offX;
295 | shader.u_offsetY=-this.data.offY;
296 | shader.u_strength=1.0;
297 | shader.u_blurX=this.data.blur;
298 | shader.u_blurY=this.data.blur;
299 | shader.u_textW=this._textureWidth;
300 | shader.u_textH=this._textureHeight;
301 | shader.u_color=this.data.getColor();
302 | }
303 |
304 | __getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.GLOW*/0x08;});
305 | GlowFilterActionGL.tmpTarget=function(scope,sprite,context,x,y){
306 | var b=scope.getValue("bounds");
307 | var out=scope.getValue("out");
308 | out.end();
309 | var tmpTarget=RenderTarget2D.create(b.width,b.height);
310 | tmpTarget.start();
311 | var color=scope.getValue("color");
312 | if (color){
313 | tmpTarget.clear(color[0],color[1],color[2],0);
314 | }
315 | scope.addValue("tmpTarget",tmpTarget);
316 | }
317 |
318 | GlowFilterActionGL.startOut=function(scope,sprite,context,x,y){
319 | var tmpTarget=scope.getValue("tmpTarget");
320 | tmpTarget.end();
321 | var out=scope.getValue("out");
322 | out.start();
323 | var color=scope.getValue("color");
324 | if (color){
325 | out.clear(color[0],color[1],color[2],0);
326 | }
327 | }
328 |
329 | GlowFilterActionGL.recycleTarget=function(scope,sprite,context,x,y){
330 | var src=scope.getValue("src");
331 | var tmpTarget=scope.getValue("tmpTarget");
332 | tmpTarget.recycle();
333 | }
334 |
335 | return GlowFilterActionGL;
336 | })(FilterActionGL)
337 |
338 |
339 | Laya.__init([WebGLFilter]);
340 | })(window,document,Laya);
341 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/libs/min/laya.d3Plugin.min.js:
--------------------------------------------------------------------------------
1 | !function(t,i,e){var n=(e.un,e.uns,e.static,e.class),r=e.getset,h=(e.__newvec,laya.d3.component.Component3D);laya.d3.core.MeshTerrainSprite3D,laya.d3.core.Sprite3D,function(t){function i(){this._meshTerrainSprite3D=null,this._finder=null,this._setting=null,this.grid=null,i.__super.call(this)}n(i,"laya.d3.component.PathFind",t);var e=i.prototype;e._load=function(i){if(!(i instanceof laya.d3.core.MeshTerrainSprite3D))throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");t.prototype._load.call(this,i),this._meshTerrainSprite3D=i},e.findPath=function(t,i,e,n){var r=this._meshTerrainSprite3D.minX,h=this._meshTerrainSprite3D.minZ,a=this._meshTerrainSprite3D.width/this.grid.width,s=this._meshTerrainSprite3D.depth/this.grid.height,o=a/2,d=s/2,l=Math.floor((t-r)/a),g=Math.floor((i-h)/s),f=Math.floor((e-r)/a),c=Math.floor((n-h)/s),p=this.grid.width-1,u=this.grid.height-1;l>p&&(l=p),g>u&&(g=u),l<0&&(l=0),g<0&&(g=0),f>p&&(f=p),c>u&&(c=u),f<0&&(f=0),c<0&&(c=0);var _=this._finder.findPath(l,g,f,c,this.grid);this.grid.reset();for(var m=1;m<_.length-1;m++){var D=_[m];D[0]=D[0]*a+o+r,D[1]=D[1]*s+d+h}return 1==_.length?(_[0][0]=e,_[0][1]=e):_.length>1&&(_[0][0]=t,_[0][1]=i,_[_.length-1][0]=e,_[_.length-1][1]=n),_},r(0,e,"setting",function(){return this._setting},function(t){t&&(this._finder=new PathFinding.finders.AStarFinder(t)),this._setting=t}),i}(h)}(window,document,Laya);
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/libs/min/laya.filter.min.js:
--------------------------------------------------------------------------------
1 | !function(t,e,i){var r=(i.un,i.uns,i.static,i.class),a=i.getset,n=(i.__newvec,laya.webgl.canvas.BlendMode),l=(laya.utils.Browser,laya.utils.Color),s=laya.filters.ColorFilterAction,o=laya.filters.webgl.ColorFilterActionGL,u=laya.filters.Filter,c=laya.filters.webgl.FilterActionGL,h=laya.maths.Matrix,d=(laya.maths.Rectangle,laya.renders.Render),f=(laya.renders.RenderContext,laya.webgl.resource.RenderTarget2D),_=laya.utils.RunDriver,g=(laya.webgl.shader.d2.ShaderDefines2D,laya.display.Sprite,laya.webgl.submit.SubmitCMD),y=laya.resource.Texture,b=laya.webgl.shader.d2.value.Value2D,p=function(){function t(){this.data=null}r(t,"laya.filters.FilterAction");var e=t.prototype;return i.imps(e,{"laya.filters.IFilterAction":!0}),e.apply=function(t){return null},t}(),w=function(){function t(){}return r(t,"laya.filters.WebGLFilter"),t.enable=function(){t.isInit||(t.isInit=!0,d.isWebGL&&(_.createFilterAction=function(t){var e;switch(t){case 32:e=new o;break;case 16:e=new v;break;case 8:e=new x}return e}))},t.isInit=!1,t.__init$=function(){_.createFilterAction=function(t){var e;switch(t){case 16:e=new p;break;case 8:e=new p;break;case 32:e=new s}return e}},t}(),v=(function(t){function e(t){this.strength=NaN,e.__super.call(this),void 0===t&&(t=4),d.isWebGL&&w.enable(),this.strength=t,this._action=_.createFilterAction(16),this._action.data=this}r(e,"laya.filters.BlurFilter",t);var i=e.prototype;i.callNative=function(t){t.conchModel&&t.conchModel.blurFilter&&t.conchModel.blurFilter(this.strength)},a(0,i,"action",function(){return this._action}),a(0,i,"type",function(){return 16}),e}(u),function(t){function e(t,i,r,a){this._color=null,e.__super.call(this),this._elements=new Float32Array(9),void 0===i&&(i=4),void 0===r&&(r=6),void 0===a&&(a=6),d.isWebGL&&w.enable(),this._color=new l(t),this.blur=Math.min(i,20),this.offX=r,this.offY=a,this._action=_.createFilterAction(8),this._action.data=this}r(e,"laya.filters.GlowFilter",t);var i=e.prototype;i.getColor=function(){return this._color._color},i.callNative=function(t){t.conchModel&&t.conchModel.glowFilter&&t.conchModel.glowFilter(this._color.strColor,this._elements[4],this._elements[5],this._elements[6])},a(0,i,"type",function(){return 8}),a(0,i,"action",function(){return this._action}),a(0,i,"offY",function(){return this._elements[6]},function(t){this._elements[6]=t}),a(0,i,"offX",function(){return this._elements[5]},function(t){this._elements[5]=t}),a(0,i,"blur",function(){return this._elements[4]},function(t){this._elements[4]=t}),e}(u),function(t){function e(){this.data=null,e.__super.call(this)}r(e,"laya.filters.webgl.BlurFilterActionGL",t);var i=e.prototype;return i.setValueMix=function(t){t.defines.add(this.data.type)},i.apply3d=function(t,e,i,r,a){var n=t.getValue("bounds"),l=b.create(1,0);l.setFilters([this.data]),h.EMPTY.identity(),i.ctx.drawTarget(t,0,0,n.width,n.height,h.EMPTY,"src",l),l.setFilters(null)},i.setValue=function(t){t.strength=this.data.strength},a(0,i,"typeMix",function(){return 16}),e}(c)),x=function(t){function e(){this.data=null,this._initKey=!1,this._textureWidth=0,this._textureHeight=0,e.__super.call(this)}r(e,"laya.filters.webgl.GlowFilterActionGL",t);var l=e.prototype;return i.imps(l,{"laya.filters.IFilterActionGL":!0}),l.setValueMix=function(t){},l.apply3d=function(t,i,r,a,l){var s=t.getValue("bounds");t.addValue("color",this.data.getColor());var o=s.width,u=s.height;this._textureWidth=o,this._textureHeight=u;var c=g.create([t,i,r,0,0],e.tmpTarget);r.ctx.addRenderObject(c);var d,f=h.TEMP;return f.identity(),d=b.create(1,0),d.setFilters([this.data]),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"src",d,null,n.TOINT.overlay),c=g.create([t,i,r,0,0],e.startOut),r.ctx.addRenderObject(c),d=b.create(1,0),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"tmpTarget",d,y.INV_UV,n.TOINT.overlay),d=b.create(1,0),r.ctx.drawTarget(t,0,0,this._textureWidth,this._textureHeight,f,"src",d),c=g.create([t,i,r,0,0],e.recycleTarget),r.ctx.addRenderObject(c),null},l.setSpriteWH=function(t){this._textureWidth=t.width,this._textureHeight=t.height},l.setValue=function(t){t.u_offsetX=this.data.offX,t.u_offsetY=-this.data.offY,t.u_strength=1,t.u_blurX=this.data.blur,t.u_blurY=this.data.blur,t.u_textW=this._textureWidth,t.u_textH=this._textureHeight,t.u_color=this.data.getColor()},a(0,l,"typeMix",function(){return 8}),e.tmpTarget=function(t,e,i,r,a){var n=t.getValue("bounds");t.getValue("out").end();var l=f.create(n.width,n.height);l.start();var s=t.getValue("color");s&&l.clear(s[0],s[1],s[2],0),t.addValue("tmpTarget",l)},e.startOut=function(t,e,i,r,a){t.getValue("tmpTarget").end();var n=t.getValue("out");n.start();var l=t.getValue("color");l&&n.clear(l[0],l[1],l[2],0)},e.recycleTarget=function(t,e,i,r,a){t.getValue("src");t.getValue("tmpTarget").recycle()},e}(c);i.__init([w])}(window,document,Laya);
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/BackGround.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/BackGround.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/BackGround.png.bak.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/BackGround.png.bak.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/atlas/.rec:
--------------------------------------------------------------------------------
1 | D .
2 | D comp
3 | P D12221A9 bg.png
4 | P 9401CC40 blank.png
5 | P B03390E5 btn_close.png
6 | P 1F3929EA button.png
7 | P 6CC6DF97 checkbox.png
8 | P FB94CCF2 clip_num.png
9 | P F7B6B7D7 clip_selectBox.png
10 | P 755271AE clip_tree_arrow.png
11 | P 859FD34C clip_tree_folder.png
12 | P A0E3B8F9 combobox.png
13 | P 9EDA959E hscroll$bar.png
14 | P 1AB768D4 hscroll$down.png
15 | P 685261D3 hscroll$up.png
16 | P 274B8076 hscroll.png
17 | P E466EB1C hslider$bar.png
18 | P C4BECA54 hslider.png
19 | P 5EDC128C html.png
20 | P ACFFCCCF image.png
21 | P 5EDC128C label.png
22 | P 5EDC128C linkbutton.png
23 | P 9E4DD730 progress$bar.png
24 | P 3FD78E12 progress.png
25 | P BF898D6A radio.png
26 | P BF898D6A radiogroup.png
27 | P 8CFD9D35 tab.png
28 | P BDA71F88 textarea.png
29 | P BDA71F88 textinput.png
30 | P 52107B89 vscroll$bar.png
31 | P E26B933E vscroll$down.png
32 | P B9680947 vscroll$up.png
33 | P 7E990267 vscroll.png
34 | P E466EB1C vslider$bar.png
35 | P 2BFF7046 vslider.png
36 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/atlas/comp.atlas:
--------------------------------------------------------------------------------
1 | {"frames":{"image.png":{"frame":{"x":0,"y":0,"w":150,"h":250,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":150,"h":250}},"bg.png":{"frame":{"x":152,"y":0,"w":100,"h":79,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":79}},"clip_num.png":{"frame":{"x":0,"y":252,"w":240,"h":27,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":240,"h":27}},"combobox.png":{"frame":{"x":152,"y":81,"w":91,"h":69,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":69}},"tab.png":{"frame":{"x":242,"y":152,"w":70,"h":78,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":70,"h":78}},"button.png":{"frame":{"x":152,"y":152,"w":75,"h":69,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":75,"h":69}},"clip_selectBox.png":{"frame":{"x":245,"y":81,"w":100,"h":40,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":40}},"html.png":{"frame":{"x":245,"y":123,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"label.png":{"frame":{"x":152,"y":232,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"linkbutton.png":{"frame":{"x":242,"y":252,"w":120,"h":18,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":120,"h":18}},"textarea.png":{"frame":{"x":242,"y":272,"w":91,"h":23,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":23}},"textinput.png":{"frame":{"x":254,"y":0,"w":91,"h":23,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":91,"h":23}},"btn_close.png":{"frame":{"x":335,"y":272,"w":28,"h":60,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":28,"h":60}},"hscroll$bar.png":{"frame":{"x":314,"y":143,"w":21,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":21,"h":51}},"vscroll$bar.png":{"frame":{"x":337,"y":143,"w":17,"h":63,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":63}},"hscroll$down.png":{"frame":{"x":314,"y":196,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"hscroll$up.png":{"frame":{"x":347,"y":0,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"vscroll$down.png":{"frame":{"x":347,"y":53,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"vscroll$up.png":{"frame":{"x":254,"y":25,"w":17,"h":51,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":51}},"clip_tree_folder.png":{"frame":{"x":273,"y":25,"w":16,"h":48,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":16,"h":48}},"progress$bar.png":{"frame":{"x":291,"y":25,"w":50,"h":14,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":50,"h":14}},"progress.png":{"frame":{"x":291,"y":41,"w":50,"h":14,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":50,"h":14}},"hslider.png":{"frame":{"x":0,"y":281,"w":100,"h":6,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":100,"h":6}},"vslider.png":{"frame":{"x":356,"y":143,"w":6,"h":100,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":6,"h":100}},"checkbox.png":{"frame":{"x":333,"y":208,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"radio.png":{"frame":{"x":102,"y":281,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"radiogroup.png":{"frame":{"x":0,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"hslider$bar.png":{"frame":{"x":16,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"vslider$bar.png":{"frame":{"x":32,"y":289,"w":14,"h":42,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":42}},"hscroll.png":{"frame":{"x":274,"y":232,"w":33,"h":17,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":33,"h":17}},"vscroll.png":{"frame":{"x":48,"y":289,"w":17,"h":33,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":17,"h":33}},"clip_tree_arrow.png":{"frame":{"x":67,"y":289,"w":14,"h":28,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":14,"h":28}},"blank.png":{"frame":{"x":347,"y":106,"w":10,"h":10,"idx":0},"spriteSourceSize":{"x":0,"y":0},"sourceSize":{"w":10,"h":10}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"comp.png","prefix":"comp\/","md5":"054dc388a3e4a50802406d800fb20f7d"}}
2 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/atlas/comp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/atlas/comp.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/atlas/rec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/atlas/rec
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/bird/bird_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/bird/bird_1.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/bird/bird_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/bird/bird_2.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/bird/bird_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/bird/bird_3.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/bird/bird_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/bird/bird_4.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/cat_sleep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/cat_sleep.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/effect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/effect.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/floor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/floor.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/hp/en_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/hp/en_bar.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/hp/hp_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/hp/hp_bar.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/hp/hp_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/hp/hp_bg.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/item/item_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/item/item_1.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/item/item_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/item/item_2.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/item/item_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/item/item_3.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/item/item_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/item/item_4.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/m_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/m_background.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/particle/heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/particle/heart.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/particle/particle.part:
--------------------------------------------------------------------------------
1 | {
2 | "textureName":"res/particle/heart.png",
3 | "textureCount":1,
4 | "useEndRadian":true,
5 | "positionVariance":{
6 | "2":0,
7 | "1":2,
8 | "0":2
9 | },
10 | "minVerticalVelocity":0.1,
11 | "minVerticalStartRadian":-0,
12 | "minVerticalEndRadian":-6.283185307179586,
13 | "minStartSize":10,
14 | "minStartRadius":96,
15 | "minRotateSpeed":-2,
16 | "minHorizontalVelocity":0.1,
17 | "minHorizontalStartRadian":-0,
18 | "minHorizontalEndRadian":-6.283185307179586,
19 | "minEndSize":12,
20 | "minEndRadius":96,
21 | "minStartColor":{
22 | "3":0.6000000238418579,
23 | "2":1,
24 | "1":0.30000001192092896,
25 | "0":1
26 | },
27 | "minEndColor":{
28 | "3":1,
29 | "2":1,
30 | "1":0,
31 | "0":0
32 | },
33 | "maxVerticalVelocity":0.1,
34 | "maxVerticalStartRadian":0,
35 | "maxVerticalEndRadian":6.283185307179586,
36 | "maxStartSize":20,
37 | "maxStartRadius":96,
38 | "maxRotateSpeed":2,
39 | "maxPartices":1600,
40 | "maxHorizontalVelocity":0.1,
41 | "maxHorizontalStartRadian":0,
42 | "maxHorizontalEndRadian":6.283185307179586,
43 | "maxEndSize":40,
44 | "maxEndRadius":96,
45 | "maxStartColor":{
46 | "3":1,
47 | "2":0,
48 | "1":0.30000001192092896,
49 | "0":1
50 | },
51 | "maxEndColor":{
52 | "3":1,
53 | "2":1,
54 | "1":0,
55 | "0":0
56 | },
57 | "gravity":{
58 | "2":0,
59 | "1":2,
60 | "0":0
61 | },
62 | "endVelocity":1,
63 | "emitterVelocitySensitivity":1,
64 | "duration":6,
65 | "colorComponentInter":true,
66 | "blendState":1,
67 | "ageAddScale":1
68 | }
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player.atlas:
--------------------------------------------------------------------------------
1 | {"frames":{"chara_01.png":{"frame":{"x":0,"y":0,"w":45,"h":71,"idx":0},"spriteSourceSize":{"x":27,"y":23},"sourceSize":{"w":96,"h":96}},"chara_02.png":{"frame":{"x":47,"y":0,"w":52,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_03.png":{"frame":{"x":0,"y":73,"w":44,"h":73,"idx":0},"spriteSourceSize":{"x":28,"y":21},"sourceSize":{"w":96,"h":96}},"chara_04.png":{"frame":{"x":101,"y":0,"w":50,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_05.png":{"frame":{"x":46,"y":73,"w":53,"h":61,"idx":0},"spriteSourceSize":{"x":22,"y":16},"sourceSize":{"w":96,"h":96}},"chara_06.png":{"frame":{"x":153,"y":0,"w":52,"h":61,"idx":0},"spriteSourceSize":{"x":23,"y":16},"sourceSize":{"w":96,"h":96}},"chara_07.png":{"frame":{"x":207,"y":0,"w":54,"h":60,"idx":0},"spriteSourceSize":{"x":21,"y":17},"sourceSize":{"w":96,"h":96}},"chara_08.png":{"frame":{"x":101,"y":73,"w":54,"h":61,"idx":0},"spriteSourceSize":{"x":21,"y":16},"sourceSize":{"w":96,"h":96}},"chara_09.png":{"frame":{"x":0,"y":148,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":13},"sourceSize":{"w":96,"h":96}},"chara_10.png":{"frame":{"x":67,"y":136,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":21,"y":12},"sourceSize":{"w":96,"h":96}},"chara_11.png":{"frame":{"x":157,"y":63,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":11},"sourceSize":{"w":96,"h":96}},"chara_12.png":{"frame":{"x":224,"y":62,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":18,"y":13},"sourceSize":{"w":96,"h":96}},"chara_13.png":{"frame":{"x":127,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_14.png":{"frame":{"x":181,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_15.png":{"frame":{"x":235,"y":139,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_16.png":{"frame":{"x":235,"y":205,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"player.png","prefix":"","md5":"6cecff3fca089fbffaec581fc54f47fc"}}
2 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player.json:
--------------------------------------------------------------------------------
1 | {"frames":{"chara_01.png":{"frame":{"x":0,"y":0,"w":45,"h":71,"idx":0},"spriteSourceSize":{"x":27,"y":23},"sourceSize":{"w":96,"h":96}},"chara_02.png":{"frame":{"x":47,"y":0,"w":52,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_03.png":{"frame":{"x":0,"y":73,"w":44,"h":73,"idx":0},"spriteSourceSize":{"x":28,"y":21},"sourceSize":{"w":96,"h":96}},"chara_04.png":{"frame":{"x":101,"y":0,"w":50,"h":71,"idx":0},"spriteSourceSize":{"x":22,"y":23},"sourceSize":{"w":96,"h":96}},"chara_05.png":{"frame":{"x":46,"y":73,"w":53,"h":61,"idx":0},"spriteSourceSize":{"x":22,"y":16},"sourceSize":{"w":96,"h":96}},"chara_06.png":{"frame":{"x":153,"y":0,"w":52,"h":61,"idx":0},"spriteSourceSize":{"x":23,"y":16},"sourceSize":{"w":96,"h":96}},"chara_07.png":{"frame":{"x":207,"y":0,"w":54,"h":60,"idx":0},"spriteSourceSize":{"x":21,"y":17},"sourceSize":{"w":96,"h":96}},"chara_08.png":{"frame":{"x":101,"y":73,"w":54,"h":61,"idx":0},"spriteSourceSize":{"x":21,"y":16},"sourceSize":{"w":96,"h":96}},"chara_09.png":{"frame":{"x":0,"y":148,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":13},"sourceSize":{"w":96,"h":96}},"chara_10.png":{"frame":{"x":67,"y":136,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":21,"y":12},"sourceSize":{"w":96,"h":96}},"chara_11.png":{"frame":{"x":157,"y":63,"w":65,"h":78,"idx":0},"spriteSourceSize":{"x":17,"y":11},"sourceSize":{"w":96,"h":96}},"chara_12.png":{"frame":{"x":224,"y":62,"w":58,"h":75,"idx":0},"spriteSourceSize":{"x":18,"y":13},"sourceSize":{"w":96,"h":96}},"chara_13.png":{"frame":{"x":127,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_14.png":{"frame":{"x":181,"y":143,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_15.png":{"frame":{"x":235,"y":139,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}},"chara_16.png":{"frame":{"x":235,"y":205,"w":52,"h":64,"idx":0},"spriteSourceSize":{"x":21,"y":13},"sourceSize":{"w":96,"h":96}}},"meta":{"app":"http:\/\/www.layabox.com","version":"1.00","format":"json","scale":1,"image":"player.png","prefix":"","md5":"6cecff3fca089fbffaec581fc54f47fc"}}
2 |
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_01.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_02.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_03.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_04.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_05.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_06.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_07.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_08.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_09.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_10.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_11.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_12.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_13.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_14.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_15.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/player/chara_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/player/chara_16.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/rec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/rec
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/spiritEffect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/spiritEffect.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/tree0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/tree0.png
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/BG.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/BG.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/DecelerationCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/DecelerationCounting.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/InvincibleCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/InvincibleCounting.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/Invincible_end.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/Invincible_end.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/Invincible_start.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/Invincible_start.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/LowerSpeed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/LowerSpeed.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/res/wav/StarCounting.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/510850111/Lolo-Horizon/0d00ef32e8555d0705d5ef2cb78685636a8c6be5/release/layaweb/1.0.0/res/wav/StarCounting.wav
--------------------------------------------------------------------------------
/release/layaweb/1.0.0/unpack.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/src/Config.js:
--------------------------------------------------------------------------------
1 | //定义背景的大小
2 | var BG_WIDTH = 800;
3 | var BG_HEIGHT = 480;
4 | //地板大小
5 | var FLOOR_HEIGHT = 84;
6 | var FLOOR_WIDTH = 960;
7 | //人物大小
8 | var PLAYER_WIDTH = 96;
9 | var PLAYER_HEIGHT = 96;
10 | //能量条背景大小
11 | var ENERGY_BG_BAR_WIDTH = 180;
12 | var ENERGY_BG_BAR_HEIGHT = 21;
13 | //能量条大小
14 | var ENERGY_BAR_WIDTH = 155;
15 | var ENERGY_BAR_HEIGHT = 12;
16 | //物品-星星大小
17 | var ITEM_STAR_WIDTH = 32;
18 | var ITEM_STAR_HEIGHT = 32;
19 | //物品-星星出现几率
20 | var ITEM_STAR_PROBABILITY = 0.8;
21 | //物品-减速道具大小
22 | var ITEM_DECELERATION_WIDTH = 40;
23 | var ITEM_DECELERATION_HEIGHT = 53;
24 | //物品-减速道具出现几率
25 | var ITEM_DECELERAYION_PROBABILITY = 0.1;
26 | //物品-无敌道具大小
27 | var ITEM_INVINCIBLE_WIDTH = 40;
28 | var ITEM_INVINCIBLE_HEIGHT = 48;
29 | //物品-无敌道具出现几率
30 | var ITEM_INVINCIBLE_PROBABILITY = 0.08;
31 |
32 | //npc大小
33 | var NPC_BIRD_WIDTH = 96;
34 | var NPC_BIRD_HEIGHT = 96;
35 | //NPC出现几率
36 | var NPC_BIRD_PROBABLITY = 0.1;
37 | //npc间隔
38 | var NPC_BIRD_INTANCE = 200;
39 |
40 | //无敌状态下能量条下降速度
41 | var ITEM_INVINCIBLE_DESCENT_SPEED = 0.20;
42 | //减速能量条下降速度
43 | var ITEM_DECELERATION_DESCENT_SPEED = 0.8;
44 |
45 | //背景移动速度
46 | var BG_SPEED = 3;
47 | //背景的帧处理间隔
48 | var BG_FRAME_DELAY = 1;
49 |
50 | //人物的奔跑速度设置是在地板移动速度那里.
51 | //人物帧处理间隔
52 | var PLAYER_FRAME_DELAY = 1;
53 | //人物奔跑频率,值越大看起来越慢
54 | var PLAYER_RUN_SPEED_DEFAULT = 190;
55 | var PLAYER_RUN_SPEED = PLAYER_RUN_SPEED_DEFAULT;
56 | //人物下落初始变量
57 | var PLAYER_DOWN_VY = 0;
58 | //人物下落速度
59 | var PLAYER_DOWN_SPEED = 2;
60 | //人物最大下落值
61 | var PLAYER_DOWN_MAX_SPEED = 32;
62 |
63 | //Npc播放频率,值越大看起来越慢
64 | var NPC_BIRD_INTERVAL = 100;
65 |
66 | //地板移动速度
67 | var FLOOR_SPEED_DEFAULT = 3.2;
68 | var FLOOR_SPEED = 3.2;
69 | var FLOOR_SPEED_MAX = 10;
70 | var FLOOR_SPEED_FASTER_STEP = 0.001;
71 | var IS_FLOOR_SPEED_MAX = false;
72 | //地板的帧处理间隔
73 | var FLOOR_FRAME_DELAY = 1;
74 |
75 | //地板管理器的帧处理间隔
76 | var MAP_FLOOR_FRAME_DELAY = 10;
77 |
78 | //能量条最小值
79 | var ENERGY_BAR_MIN_VALUE = 0;
80 | //能量条最大值
81 | var ENERGY_BAR_MAX_VALUE = 100;
82 | //能量条背景位置
83 | var ENERGY_BAR_X = 15;
84 | var ENERGY_BAR_Y = 2;
85 |
86 | //物品出现在地板上的间隔
87 | var ITEMNUM_ON_FLOOR = 2;
88 | //NPC在地板上出现的间隔
89 | var NPC_BIRD_NUM_ON_FLOOR = 2;
90 |
91 | //分数栏
92 | var SCORETEXT_COLOR = "#FFFFFF";//颜色
93 | var SCORETEXT_FONT_SIZE = 30;//字体大小
94 | var SCORETEXT_TEXT_DEFAULT = 0;//默认文字
95 | var SCORETEXT_ALIGN = "right";// "left": 居左对齐显示。 "center": 居中对齐显示。 "right": 居右对齐显示。
96 |
97 | //游戏相关状态
98 | var IS_PAUSE = false;
99 | var IS_OVER = false;
100 |
101 | var BG_MUSIC_VOLUME = 0.5;
102 |
103 |
104 | var Sprite = laya.display.Sprite;
105 | var Handler = laya.utils.Handler;
106 | var Animation = laya.display.Animation;
107 | var SoundManager = laya.media.SoundManager;
108 | var Pool = laya.utils.Pool;
109 | var Text = laya.display.Text;
110 | var Tween = laya.utils.Tween;
111 |
112 | if( window.conch )
113 | {
114 | //值为1:表示所有LOGE全部弹出alert
115 | //值为2:表示所有LOGE和LOGW全部弹出alert
116 | window.conch.config.setDebugLevel(2);
117 | }
--------------------------------------------------------------------------------
/src/init.js:
--------------------------------------------------------------------------------
1 | /*这里面只用于laya引擎初始化和图片加载功能 其他不管 */
2 | //laya初始化
3 | Laya.init(BG_WIDTH, BG_HEIGHT, Laya.WebGL);
4 | //FPS
5 | // Laya.Stat.show(0, 0);
6 | //设置适配模式
7 | Laya.stage.scaleMode = "exactfit";
8 | //设置居中对齐
9 | Laya.stage.alignH = "center";
10 | //设置横屏
11 | Laya.stage.screenMode = "none";
12 | //设置分辨率
13 | Laya.stage.scaleMode = "showall";
14 |
15 | //loading
16 | var loading = new Loading();
17 | Laya.stage.addChild(loading);
18 |
19 | this.runGame = null;
20 |
21 | //游戏介绍
22 | var gameInfo = new GameInfo();
23 |
24 | //加载单个资源
25 | var asset = [];
26 | asset.push({
27 | url: [
28 | "res/BackGround.png",
29 | "res/tree0.png",
30 | "res/floor.png",
31 | "res/cat_sleep.png",
32 | "res/bird/bird_1.png",
33 | "res/bird/bird_2.png",
34 | "res/bird/bird_3.png",
35 | "res/bird/bird_4.png",
36 | "res/item/item_1.png",
37 | "res/item/item_2.png",
38 | "res/item/item_3.png",
39 | "res/item/item_4.png",
40 | "res/hp/hp_bg.png",
41 | "res/hp/hp_bar.png",
42 | "res/hp/en_bar.png",
43 | "res/effect.png",
44 | "res/particle/heart.png"
45 | ],
46 | type: Laya.Loader.IMAGE
47 | });
48 |
49 | //加载图集资源
50 | asset.push({
51 | url: "res/player.json",
52 | type: Laya.Loader.ATLAS
53 | });
54 |
55 | //加载资源
56 | Laya.loader.load(asset, Handler.create(this, onLoaded), Handler.create(this, onLoading, null, false));
57 |
58 |
59 | //加载进度
60 | function onLoading(progress) {
61 | console.log("正在加载,加载进度: " + progress + "\n");
62 | loading.progress(progress);
63 | }
64 |
65 | //加载完成
66 | function onLoaded() {
67 | console.log("图片资源加载完毕\n");
68 | //开始渲染游戏
69 | Laya.stage.renderingEnabled=true;
70 | //加载完毕移除loading 显示游戏提示UI 并且初始化游戏
71 | Laya.stage.removeChild(loading);
72 | //实例化RunGame
73 | var runGame = new RunGame();
74 | this.runGame = runGame;
75 | //把RunGame添加到舞台上
76 | Laya.stage.addChild(runGame);
77 | Laya.stage.addChild(gameInfo);
78 |
79 | }
80 |
81 | function initGame(isRestartGame){
82 | gameInfo.init("游戏已结束!请重新开始游戏!");
83 | Laya.stage.removeChildren(this.runGame);
84 | onLoaded();
85 | }
86 |
--------------------------------------------------------------------------------
/src/runGame/BackGround.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | /**
3 | * 背景类
4 | */
5 |
6 | function BackGround() {
7 | //自定义背景1
8 | this.bg1 = null;
9 | //自定义背景2
10 | this.bg2 = null;
11 | //树木
12 | this.tree = null;
13 | //cat
14 | this.cat = null;
15 |
16 |
17 | BackGround.__super.call(this);
18 | this.init();
19 | }
20 |
21 | //注册这个类
22 | Laya.class(BackGround, "BackGround", Sprite);
23 |
24 | //拿到原型
25 | var _proto = BackGround.prototype;
26 |
27 | _proto.init = function () {
28 | var texture1 = Laya.loader.getRes("res/BackGround.png");
29 | var texture2 = Laya.loader.getRes("res/BackGround.png");
30 | var textureTree = Laya.loader.getRes("res/tree0.png");
31 | var textureCat = Laya.loader.getRes("res/m_background.png");
32 | //播放背景音乐
33 | //背景音乐同时只能播放一个,
34 | //如果在播放背景音乐时再次调用本方法,
35 | //会先停止之前的背景音乐,再播放当前的背景音乐。
36 | //也就是说,这个方法只能用于背景音乐
37 | Laya.SoundManager.musicVolume = BG_MUSIC_VOLUME;
38 | Laya.SoundManager.playMusic("res/wav/BG.wav",0);
39 | //创建背景1
40 | this.bg1 = new Sprite();
41 | //绘制背景图1
42 | this.bg1.graphics.drawTexture(texture1, 0, 0);
43 | //把背景1添加到当前容器对象里
44 | this.addChild(this.bg1);
45 |
46 | //创建背景2
47 | this.bg2 = new Sprite();
48 | //绘制背景图2
49 | this.bg2.graphics.drawTexture(texture2, 0, 0);
50 | //把背景1添加到当前容器对象里
51 | this.addChild(this.bg2);
52 | //把第二个背景放到第一个背景后面紧跟着
53 | this.bg2.pos(BG_WIDTH, 0);
54 |
55 | //前景图片树木
56 | this.tree = new Sprite();
57 | //绘制树木
58 | this.tree.graphics.drawTexture(textureTree, 0, 0);
59 |
60 | this.addChild(this.tree);
61 |
62 | this.tree.pos(BG_WIDTH, 64);
63 |
64 | //绘制猫
65 | this.cat = new Sprite();
66 |
67 | this.cat.graphics.drawTexture(textureCat,0,0,64,64);
68 |
69 | this.addChild(this.cat);
70 |
71 |
72 | //创建一个帧循环处理函数,用于背景位置的更新,实现背景滚动效果。
73 | Laya.timer.frameLoop(BG_FRAME_DELAY, this, this.onLoop)
74 |
75 | }
76 |
77 | _proto.onLoop = function () {
78 | if(IS_PAUSE || IS_OVER){return;}
79 |
80 | //移动
81 | this.x -= BG_SPEED;
82 |
83 | //当背景1向左移动出游戏的显示区域,则将背景1的x轴坐标,向右移动*2.
84 | if (this.bg1.x + this.x <= -BG_WIDTH) {
85 | this.bg1.x += BG_WIDTH * 2;
86 | }
87 | //当背景2向左移动出游戏的显示区域,则将背景2的x轴坐标,向右移动*2.
88 | if (this.bg2.x + this.x <= -BG_WIDTH) {
89 | this.bg2.x += BG_WIDTH * 2;
90 | }
91 | //树木移动
92 | if (this.tree.x + this.x <= -BG_WIDTH) {
93 | this.tree.x += BG_WIDTH * 2;
94 | }
95 | //cat移动
96 | if (this.cat.x + this.x <= -BG_WIDTH) {
97 | this.cat.x += BG_WIDTH * 2;
98 | }
99 | }
100 |
101 |
102 | })();
--------------------------------------------------------------------------------
/src/runGame/EnergyBar.js:
--------------------------------------------------------------------------------
1 | //这里面包含了生命条和无敌状态能量条
2 |
3 | (function () {
4 | /**
5 | * 能量条,包含生命条和无敌状态能量条
6 | */
7 | function EnergyBar(type) {
8 | //背景
9 | this.bg = null;
10 | //进度条
11 | this.bar = null;
12 | //最小值
13 | this.minValue = ENERGY_BAR_MIN_VALUE;
14 | //最大值
15 | this.maxValue = ENERGY_BAR_MAX_VALUE;
16 | //残影
17 | this.bodyEffect1 = null;
18 | this.bodyEffect2 = null;
19 | //特效
20 | this.spiritEffect = null;
21 | //当前值
22 | this.value = 0;
23 | EnergyBar.__super.call(this);
24 |
25 | this.SoundManager = laya.media.SoundManager;
26 | this.init(type);
27 | }
28 |
29 | //能量类型
30 | EnergyBar.TYPE_DECELERATION = "Deceleration";//减速
31 | EnergyBar.TYPE_INVINCIBLE = "Invincible";//无敌
32 |
33 | //注册
34 | Laya.class(EnergyBar, "EnergyBar", Sprite);
35 |
36 | var _proto = EnergyBar.prototype;
37 |
38 | _proto.init = function (type) {
39 | this.width = ENERGY_BG_BAR_WIDTH;
40 | this.height = ENERGY_BG_BAR_HEIGHT;
41 | //能量/血条背景
42 | var textureEnergyBarBG = Laya.loader.getRes("res/hp/hp_bg.png");
43 | //这个会选择性加载能量条还是血条
44 | var textureEnergyBarType = null;
45 | //选择加载能量条还是血条
46 | switch (type) {
47 | //能量条
48 | case EnergyBar.TYPE_DECELERATION:
49 | textureEnergyBarType = Laya.loader.getRes("res/hp/en_bar.png");
50 | break;
51 | //血条
52 | case EnergyBar.TYPE_INVINCIBLE:
53 | textureEnergyBarType = Laya.loader.getRes("res/hp/hp_bar.png");
54 | break;
55 | }
56 |
57 | this.bg = new Sprite();
58 | this.bar = new Sprite();
59 | this.bar.x = ENERGY_BAR_X;
60 | this.bar.y = ENERGY_BAR_Y;
61 |
62 | this.bar.scale(this.value / this.maxValue,1);
63 |
64 | //绘制血条和能量条
65 | this.bg.graphics.drawTexture(textureEnergyBarBG, 0, 0, ENERGY_BG_BAR_WIDTH, ENERGY_BG_BAR_HEIGHT);
66 | this.bar.graphics.drawTexture(textureEnergyBarType, 0, 0, ENERGY_BAR_WIDTH, ENERGY_BAR_HEIGHT);
67 |
68 | this.addChild(this.bg);
69 | this.addChild(this.bar);
70 | }
71 |
72 | _proto.updateEnergyValue = function(value){
73 | this.value = value;
74 | if(this.value > this.maxValue){this.value = this.maxValue}
75 | if(this.value < this.minValue){this.value = this.minValue}
76 | this.bar.scale(this.value / this.maxValue,1);
77 | }
78 |
79 | _proto.addEnergyValue = function(value){
80 | this.value += value;
81 | this.updateEnergyValue(this.value);
82 | }
83 |
84 | })();
--------------------------------------------------------------------------------
/src/runGame/Floor.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | /**
3 | * 地板类
4 | */
5 | function Floor() {
6 |
7 | //背景贴图
8 | this.bgTexture = null;
9 | //背景
10 | this.bg = null;
11 | //最大右边距离
12 | this.maxRight = 0;
13 | //是否完全出屏幕
14 | this.isOutComplete = false;
15 | //背景右边补丁
16 | this.rightBg = null;
17 | //当前地板上的物品的集合
18 | this.itemList = [];
19 | //当前地板上的Npc的集合
20 | this.birdList = [];
21 | //计时器,用于加快地板速度
22 | this.timer = null;
23 |
24 | Floor.__super.call(this);
25 | }
26 |
27 | //事件名称:OUT_COMPLETE
28 | //超过一定屏幕触发floor的OUT_COMPLETE事件
29 | Floor.OUT_COMPLETE = "floor_out_complete";
30 | //整个地板都不在屏幕里面事件
31 | Floor.OUT_DIE = "floor_out_die";
32 |
33 | //注册这个类
34 | Laya.class(Floor, "Floor", Sprite);
35 |
36 | var _proto = Floor.prototype;
37 |
38 | _proto.init = function (type) {
39 | /**
40 | * 初始化Floor
41 | */
42 | //是否需要在地板上增加道具
43 | var isNeedItem = true;
44 | //如果不开启autoSize 父容器的宽度和高度无法获取
45 | this.autoSize = true;
46 | //初始化的时候将坐标放到屏幕右边
47 | this.x = BG_WIDTH;
48 | //应该把地板放在屏幕中间
49 | this.y = (BG_HEIGHT - FLOOR_HEIGHT) / 2;
50 |
51 | if (this.bg == null) {
52 | //贴图纹理
53 | this.bgTexture = Laya.loader.getRes("res/floor.png");
54 | this.bg = new Sprite();
55 | //清空绘制
56 | this.bg.graphics.clear();
57 |
58 | this.addChild(this.bg);
59 | }
60 | //绘制地板
61 | this.bg.graphics.drawTexture(this.bgTexture, 0, 0)
62 |
63 | if(isNeedItem){this.addItem();}
64 | this.addBird();
65 | //创建一个帧循环处理函数
66 | Laya.timer.frameLoop(FLOOR_FRAME_DELAY, this, this.onLoop);
67 | }
68 |
69 | _proto.onLoop = function () {
70 | if(IS_PAUSE || IS_OVER) {return};
71 | /**
72 | * 帧循环处理函数
73 | */
74 |
75 | //让地板的速度和移动比背景快一点
76 | this.x -= FLOOR_SPEED;
77 |
78 | //地板的速度不断是累加的,最大是FLOOR_SPEED_MAX
79 | if(!IS_FLOOR_SPEED_MAX){this.moveFaster();}
80 |
81 | //判断是否出了边界 如果出了 就通知生成新的floor 这里增加一个变量来判断当前是否已经通知外部了
82 | if (!this.isOutComplete && (this.x + BG_WIDTH) < FLOOR_WIDTH) {
83 |
84 | this.isOutComplete = true;
85 |
86 | this.event(Floor.OUT_COMPLETE, this);
87 |
88 | } else if ((this.x + BG_WIDTH + FLOOR_WIDTH) < 0) {
89 | //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor
90 | Laya.timer.clear(this, this.onLoop);
91 | //如果有物品先隐藏
92 | for(var i = 0; i < this.itemList.length; i++){
93 | // this.itemList[i].visible = false;
94 | }
95 | this.visible = false;
96 | this.event(Floor.OUT_DIE, this);
97 |
98 | }
99 |
100 | }
101 |
102 | /**
103 | * 允许在地板上添加物品
104 | */
105 | _proto.addItem = function () {
106 | //创建一个随机数
107 | var randomNumber = parseInt(Math.random() * 10);
108 | //如果随机数小于五,不添加,因为会造成道具太多的问题
109 | if(randomNumber < 1) return;
110 | //需要添加的数量
111 | var addNum = 0;
112 | //计算道具的最大数量,现在强制道具的宽度都是32
113 | var maxItemNum = Math.floor( FLOOR_WIDTH / 32);
114 | //定制数量的规则
115 | if(maxItemNum >= 5){
116 | addNum = 5 + Math.floor((maxItemNum - 5) * Math.random());;
117 | }else{
118 | addNum = maxItemNum;
119 | }
120 | //计算居中的点
121 | var sx = FLOOR_WIDTH / addNum;
122 | var arr = [];
123 | var isHasSpecialItem = false;
124 | for(var i = 0;i