zhaochengyang 5 anos atrás
pai
commit
5f313939c9
62 arquivos alterados com 3185 adições e 3115 exclusões
  1. 0 7
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/00a62a663c5298bc6cd31216005c5becb1ac0b42
  2. 0 10
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/03c0e36130d6b70f7717b5b96b980fd28789e8be
  3. 0 15
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/2ac49b195bd9a2c2baad9be6f31dee07da9e1366
  4. 0 12
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/4626b5c14022884f3be74a31a91dc0a9e471f165
  5. 0 15
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/570f38446dd82a64bfd12781f2cc7f844b7cfcb9
  6. 0 5
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/6bf29cdd76ea7c09dab0a8fc46c6a101e9eb9c86
  7. 0 14
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/6fd18996fcad56be4a7030e04aa9f4c17c85157f
  8. 0 12
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/a3856b41b48c260d2e78ef3f4e8d06d1a6bdd289
  9. 0 11
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/a75bd04591c5637b89351d4827e0bfb77b996b61
  10. 0 5
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/b25af2fa6af2acdf37cf4ea2dda4e6a19de169c1
  11. 0 9
      .rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/b8ae647c3e066967c5cdcc5d80f92e93813b8739
  12. 1 1
      bin/Prefab/1024.json
  13. 1 1
      bin/Prefab/128.json
  14. 1 1
      bin/Prefab/16.json
  15. 1 1
      bin/Prefab/16384.json
  16. 1 1
      bin/Prefab/2.json
  17. 1 1
      bin/Prefab/2048.json
  18. 1 1
      bin/Prefab/256.json
  19. 1 1
      bin/Prefab/32.json
  20. 1 1
      bin/Prefab/4.json
  21. 1 1
      bin/Prefab/4096.json
  22. 1 1
      bin/Prefab/512.json
  23. 1 1
      bin/Prefab/64.json
  24. 1 1
      bin/Prefab/8.json
  25. 1 1
      bin/Prefab/8192.json
  26. 1 1
      bin/fileconfig.json
  27. 2 0
      bin/h5/.rec
  28. 1 1
      bin/h5/WinView.atlas
  29. BIN
      bin/h5/WinView.png
  30. 2894 2786
      bin/js/bundle.js
  31. 1 1
      bin/js/bundle.js.map
  32. 1 1
      bin/unpack.json
  33. 4 4
      laya/.laya
  34. 17 4
      laya/pages/FailureView.scene
  35. 8 8
      laya/pages/InGameScene.scene
  36. 17 9
      laya/pages/MainScene.scene
  37. 1 2
      laya/pages/Prefab/1024.prefab
  38. 1 2
      laya/pages/Prefab/128.prefab
  39. 1 2
      laya/pages/Prefab/16.prefab
  40. 1 2
      laya/pages/Prefab/16384.prefab
  41. 1 2
      laya/pages/Prefab/2.prefab
  42. 1 2
      laya/pages/Prefab/2048.prefab
  43. 1 2
      laya/pages/Prefab/256.prefab
  44. 1 2
      laya/pages/Prefab/32.prefab
  45. 1 2
      laya/pages/Prefab/4.prefab
  46. 1 2
      laya/pages/Prefab/4096.prefab
  47. 1 2
      laya/pages/Prefab/512.prefab
  48. 1 2
      laya/pages/Prefab/64.prefab
  49. 1 2
      laya/pages/Prefab/8.prefab
  50. 1 2
      laya/pages/Prefab/8192.prefab
  51. 16 2
      laya/pages/WinView.scene
  52. 1 1
      src/GameConfig.ts
  53. 22 11
      src/Main/Ball.ts
  54. 10 4
      src/Main/GameControl.ts
  55. 7 85
      src/Main/GameManager.ts
  56. 1 1
      src/Tool/EventManager.ts
  57. 6 3
      src/View/FailureView.ts
  58. 90 30
      src/View/InGameView.ts
  59. 5 1
      src/View/MainView.ts
  60. 40 0
      src/View/ViewManager.ts
  61. 4 1
      src/View/WinView.ts
  62. 9 4
      src/ui/layaMaxUI.ts

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 7
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/00a62a663c5298bc6cd31216005c5becb1ac0b42


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 10
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/03c0e36130d6b70f7717b5b96b980fd28789e8be


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 15
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/2ac49b195bd9a2c2baad9be6f31dee07da9e1366


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 12
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/4626b5c14022884f3be74a31a91dc0a9e471f165


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 15
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/570f38446dd82a64bfd12781f2cc7f844b7cfcb9


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 5
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/6bf29cdd76ea7c09dab0a8fc46c6a101e9eb9c86


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 14
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/6fd18996fcad56be4a7030e04aa9f4c17c85157f


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 12
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/a3856b41b48c260d2e78ef3f4e8d06d1a6bdd289


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 11
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/a75bd04591c5637b89351d4827e0bfb77b996b61


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 5
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/b25af2fa6af2acdf37cf4ea2dda4e6a19de169c1


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 9
.rpt2_cache/rpt2_8e09b7b3b04a8596c33e40b517b15cbae160b113/code/cache/b8ae647c3e066967c5cdcc5d80f92e93813b8739


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/1024.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/128.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/16.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/16384.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/2.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/2048.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/256.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/32.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/4.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/4096.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/512.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/64.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/8.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/Prefab/8192.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/fileconfig.json


+ 2 - 0
bin/h5/.rec

@@ -77,6 +77,7 @@ P 9ABD9CBD func3.png
 P 9AE7FF5E func4.png
 P CFFDECAE func5.png
 D MainView
+R 54B68F22 logo.png
 R 9E2456ED main1-1.png
 P FB70ABCE zhujiemian-1-1(1).png
 P 07FDD0FA zhujiemian-1-2(1).png
@@ -207,6 +208,7 @@ P FFE41E4D BoosterShoot1_00254.png
 P 0147D2E2 BoosterShoot1_00255.png
 P 0147D2E2 BoosterShoot1_00256.png
 D WinView
+P 364C6A04 black.png
 R 2BA03ECE guoguan-1-1.png
 P 61A8584F guoguan-1-2.png
 P 460AED94 guoguan-1-3.png

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/h5/WinView.atlas


BIN
bin/h5/WinView.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 2894 - 2786
bin/js/bundle.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/js/bundle.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
bin/unpack.json


+ 4 - 4
laya/.laya

@@ -1,6 +1,6 @@
 <project version="2.0">
-   <asynRes>img,temp,sound                                                                                             </asynRes>
-   <unDealRes>embed                                                                                             </unDealRes>
+   <asynRes>img,temp,sound                                                                                                </asynRes>
+   <unDealRes>embed                                                                                                </unDealRes>
    <resTypes>png,jpg   </resTypes>
    <resExportPath>bin/h5   </resExportPath>
    <asynResExportPath>bin   </asynResExportPath>
@@ -15,7 +15,7 @@ var Dialog=laya.ui.Dialog;]]>   </codeImportsJS>
    <shareResPath/>
    <codeType>1   </codeType>
    <resCanCompress/>
-   <resPublishQuality>80                                                                                             </resPublishQuality>
+   <resPublishQuality>80                                                                                                </resPublishQuality>
    <langPath/>
    <defaultFont/>
    <codeImportsTS><![CDATA[import View=Laya.View;
@@ -46,7 +46,7 @@ import Scene=Laya.Scene;]]>   </codeImportsTS>
    <idePath/>
    <ver>2.0   </ver>
    <stat>false   </stat>
-   <physicsDebug>false   </physicsDebug>
+   <physicsDebug>true   </physicsDebug>
    <toJsonScene>true   </toJsonScene>
    <compressTexture>false   </compressTexture>
    <libProjectPath/>

+ 17 - 4
laya/pages/FailureView.scene

@@ -2,11 +2,11 @@
     "x":0,
     "type":"Scene",
     "selectedBox":2,
-    "selecteID":5,
+    "selecteID":8,
     "searchKey":"Scene",
     "props":{"width":720,"sceneColor":"#000000","height":1280},
     "nodeParent":-1,
-    "maxID":8,
+    "maxID":9,
     "label":"Scene",
     "isOpen":true,
     "isDirectory":true,
@@ -17,18 +17,31 @@
         {
             "x":15,
             "type":"Image",
+            "searchKey":"Image,BG",
+            "props":{"y":0,"x":0,"var":"BG","top":0,"skin":"WinView/black.png","sizeGrid":"12,14,14,13","right":0,"left":0,"bottom":0},
+            "nodeParent":2,
+            "label":"BG",
+            "isDirectory":false,
+            "isAniNode":true,
+            "hasChild":false,
+            "compId":8,
+            "child":[
+                ]
+        },
+        {
+            "x":15,
+            "type":"Image",
             "searchKey":"Image",
             "props":{"y":16,"x":0,"skin":"ReviveView/fuhuo-1-1.png"},
             "nodeParent":2,
             "label":"Image",
-            "isOpen":true,
+            "isOpen":false,
             "isDirectory":true,
             "isAniNode":true,
             "hasChild":true,
             "compId":5,
             "child":[
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":252,"x":285,"skin":"FailureView/shibai-1-1.png"},

+ 8 - 8
laya/pages/InGameScene.scene

@@ -2,11 +2,11 @@
     "x":0,
     "type":"Scene",
     "selectedBox":2,
-    "selecteID":684,
+    "selecteID":52,
     "searchKey":"Scene",
     "props":{"width":720,"sceneColor":"#000000","pref":"@Prefab:Pr","height":1280},
     "nodeParent":-1,
-    "maxID":685,
+    "maxID":686,
     "label":"Scene",
     "isOpen":true,
     "isDirectory":true,
@@ -17,8 +17,8 @@
         {
             "x":15,
             "type":"Image",
-            "searchKey":"Image,BottomCollider",
-            "props":{"y":892,"x":0,"width":729,"visible":true,"skin":"InGameView/colliderbottom.png","scaleY":1,"scaleX":1,"name":"BottomCollider","height":211,"bottom":177,"alpha":1},
+            "searchKey":"Image,BottomCollider,BottomCollider",
+            "props":{"y":892,"x":0,"width":729,"visible":true,"var":"BottomCollider","skin":"InGameView/colliderbottom.png","scaleY":1,"scaleX":1,"name":"BottomCollider","height":211,"bottom":177,"alpha":1},
             "nodeParent":2,
             "label":"BottomCollider",
             "isOpen":false,
@@ -62,8 +62,8 @@
         {
             "x":15,
             "type":"Image",
-            "searchKey":"Image,RightCollider",
-            "props":{"y":937,"x":720,"width":82,"skin":"InGameView/0.png","pivotY":939,"pivotX":79,"name":"RightCollider","height":957,"alpha":1},
+            "searchKey":"Image,RightCollider,RightCollider",
+            "props":{"y":937,"x":720,"width":82,"var":"RightCollider","skin":"InGameView/0.png","pivotY":939,"pivotX":79,"name":"RightCollider","height":957,"alpha":1},
             "nodeParent":2,
             "label":"RightCollider",
             "isOpen":false,
@@ -106,8 +106,8 @@
         {
             "x":15,
             "type":"Image",
-            "searchKey":"Image,LeftCollider",
-            "props":{"y":943,"x":78,"width":80,"skin":"InGameView/1.png","scaleY":1,"scaleX":1,"pivotY":939,"pivotX":80,"name":"LeftCollider","height":885,"alpha":1},
+            "searchKey":"Image,LeftCollider,LeftCollider",
+            "props":{"y":943,"x":78,"width":80,"var":"LeftCollider","skin":"InGameView/1.png","scaleY":1,"scaleX":1,"pivotY":939,"pivotX":80,"name":"LeftCollider","height":885,"alpha":1},
             "nodeParent":2,
             "label":"LeftCollider",
             "isOpen":false,

+ 17 - 9
laya/pages/MainScene.scene

@@ -2,11 +2,11 @@
     "x":0,
     "type":"View",
     "selectedBox":2,
-    "selecteID":32,
+    "selecteID":41,
     "searchKey":"View",
     "props":{"width":720,"sceneColor":"#000000","height":1280},
     "nodeParent":-1,
-    "maxID":41,
+    "maxID":42,
     "label":"View",
     "isOpen":true,
     "isDirectory":true,
@@ -63,14 +63,13 @@
             "props":{"name":"decorate"},
             "nodeParent":2,
             "label":"decorate",
-            "isOpen":true,
+            "isOpen":false,
             "isDirectory":true,
             "isAniNode":true,
             "hasChild":true,
             "compId":15,
             "child":[
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":868,"x":492,"width":90,"skin":"Ball/blast-10.png","pivotY":45,"pivotX":45,"height":90},
@@ -97,7 +96,6 @@
                         }]
                 },
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":840,"x":188,"width":110,"skin":"Ball/blast-12.png","pivotY":55,"pivotX":55,"height":110},
@@ -124,7 +122,6 @@
                         }]
                 },
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":693,"x":484,"width":150,"skin":"Ball/blast-13.png","height":150},
@@ -151,7 +148,6 @@
                         }]
                 },
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":593,"x":150,"width":170,"skin":"Ball/blast-14.png","height":170},
@@ -164,7 +160,6 @@
                     "compId":37,
                     "child":[
                         {
-                            "x":45,
                             "type":"FontClip",
                             "searchKey":"FontClip",
                             "props":{"y":85,"x":85,"width":108,"value":"128","skin":"Ball/44.png","sheet":"0123456789","pivotY":22,"pivotX":54,"height":43},
@@ -179,7 +174,6 @@
                         }]
                 },
                 {
-                    "x":30,
                     "type":"Image",
                     "searchKey":"Image",
                     "props":{"y":757,"x":131,"width":90,"skin":"Ball/blast-10.png","pivotY":45,"pivotX":45,"height":90},
@@ -247,6 +241,20 @@
             "compId":33,
             "child":[
                 ]
+        },
+        {
+            "x":15,
+            "type":"Image",
+            "searchKey":"Image",
+            "props":{"y":230,"x":360,"width":526,"skin":"MainView/logo.png","pivotY":169,"pivotX":263,"height":305},
+            "nodeParent":2,
+            "label":"Image",
+            "isDirectory":false,
+            "isAniNode":true,
+            "hasChild":false,
+            "compId":41,
+            "child":[
+                ]
         }],
     "animations":[
         {

+ 1 - 2
laya/pages/Prefab/1024.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":325,
-    "selecteID":330,
     "searchKey":"Image,1024",
     "props":{"y":0,"x":0,"width":160,"skin":"Ball/blast-17.png","presetID":1,"preset":"laya/pages/Prefab/1024.prefab","pivotY":80,"pivotX":80,"name":"1024","isPresetRoot":true,"height":160},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":80,"presetID":2,"preset":"laya/pages/Prefab/1024.prefab"},
+            "props":{"restitution":0.5,"radius":80,"presetID":2,"preset":"laya/pages/Prefab/1024.prefab"},
             "nodeParent":325,
             "label":"CircleCollider(1024)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/128.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":312,
-    "selecteID":318,
     "searchKey":"Image,128",
     "props":{"y":0,"x":0,"width":130,"skin":"Ball/blast-14.png","presetID":1,"preset":"laya/pages/Prefab/128.prefab","pivotY":65,"pivotX":65,"name":"128","isPresetRoot":true,"height":130},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":65,"presetID":2,"preset":"laya/pages/Prefab/128.prefab"},
+            "props":{"restitution":0.5,"radius":65,"presetID":2,"preset":"laya/pages/Prefab/128.prefab"},
             "nodeParent":312,
             "label":"CircleCollider(128)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/16.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":300,
-    "selecteID":305,
     "searchKey":"Image,16",
     "props":{"y":0,"x":0,"width":100,"skin":"Ball/blast-11.png","presetID":1,"preset":"laya/pages/Prefab/16.prefab","pivotY":50,"pivotX":50,"name":"16","isPresetRoot":true,"height":100},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":50,"presetID":2,"preset":"laya/pages/Prefab/16.prefab"},
+            "props":{"restitution":0.5,"radius":50,"presetID":2,"preset":"laya/pages/Prefab/16.prefab"},
             "nodeParent":300,
             "label":"CircleCollider(16)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/16384.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":343,
-    "selecteID":348,
     "searchKey":"Image,16384",
     "props":{"y":0,"x":0,"width":200,"skin":"Ball/blast-21.png","presetID":1,"preset":"laya/pages/Prefab/16384.prefab","pivotY":100,"pivotX":100,"name":"16384","isPresetRoot":true,"height":200},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"y":0,"x":0,"restitution":0.6,"radius":100,"presetID":2,"preset":"laya/pages/Prefab/16384.prefab"},
+            "props":{"y":0,"x":0,"restitution":0.5,"radius":100,"presetID":2,"preset":"laya/pages/Prefab/16384.prefab"},
             "nodeParent":343,
             "label":"CircleCollider(16384)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/2.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":286,
-    "selecteID":292,
     "searchKey":"Image,2",
     "props":{"y":0,"x":0,"width":65,"skin":"Ball/blast-08.png","presetID":1,"preset":"laya/pages/Prefab/2.prefab","pivotY":33,"pivotX":33,"name":"2","isPresetRoot":true,"height":65},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":32.5,"presetID":2,"preset":"laya/pages/Prefab/2.prefab"},
+            "props":{"restitution":0.5,"radius":32.5,"presetID":2,"preset":"laya/pages/Prefab/2.prefab"},
             "nodeParent":286,
             "label":"CircleCollider(2)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/2048.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":329,
-    "selecteID":334,
     "searchKey":"Image,2048",
     "props":{"y":0,"x":0,"width":170,"skin":"Ball/blast-18.png","presetID":1,"preset":"laya/pages/Prefab/2048.prefab","pivotY":85,"pivotX":85,"name":"2048","isPresetRoot":true,"height":170},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":85,"presetID":2,"preset":"laya/pages/Prefab/2048.prefab"},
+            "props":{"restitution":0.5,"radius":85,"presetID":2,"preset":"laya/pages/Prefab/2048.prefab"},
             "nodeParent":329,
             "label":"CircleCollider(2048)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/256.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":317,
-    "selecteID":322,
     "searchKey":"Image,256",
     "props":{"y":0,"x":0,"width":140,"skin":"Ball/blast-15.png","presetID":1,"preset":"laya/pages/Prefab/256.prefab","pivotY":70,"pivotX":70,"name":"256","isPresetRoot":true,"height":140},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":70,"presetID":2,"preset":"laya/pages/Prefab/256.prefab"},
+            "props":{"restitution":0.5,"radius":70,"presetID":2,"preset":"laya/pages/Prefab/256.prefab"},
             "nodeParent":317,
             "label":"CircleCollider(256)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/32.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":304,
-    "selecteID":309,
     "searchKey":"Image,32",
     "props":{"y":0,"x":0,"width":110,"skin":"Ball/blast-12.png","presetID":1,"preset":"laya/pages/Prefab/32.prefab","pivotY":55,"pivotX":55,"name":"32","isPresetRoot":true,"height":110},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":55,"presetID":2,"preset":"laya/pages/Prefab/32.prefab"},
+            "props":{"restitution":0.5,"radius":55,"presetID":2,"preset":"laya/pages/Prefab/32.prefab"},
             "nodeParent":304,
             "label":"CircleCollider(32)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/4.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":290,
-    "selecteID":295,
     "searchKey":"Image,4",
     "props":{"y":0,"x":0,"width":80,"skin":"Ball/blast-09.png","presetID":1,"preset":"laya/pages/Prefab/4.prefab","pivotY":40,"pivotX":40,"name":"4","isPresetRoot":true,"height":80},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":40,"presetID":2,"preset":"laya/pages/Prefab/4.prefab"},
+            "props":{"restitution":0.5,"radius":40,"presetID":2,"preset":"laya/pages/Prefab/4.prefab"},
             "nodeParent":290,
             "label":"CircleCollider(4)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/4096.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":333,
-    "selecteID":340,
     "searchKey":"Image,4096",
     "props":{"y":0,"x":0,"width":180,"skin":"Ball/blast-19.png","presetID":1,"preset":"laya/pages/Prefab/4096.prefab","pivotY":90,"pivotX":90,"name":"4096","isPresetRoot":true,"height":180},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"y":0,"x":0,"restitution":0.6,"radius":90,"presetID":2,"preset":"laya/pages/Prefab/4096.prefab"},
+            "props":{"y":0,"x":0,"restitution":0.5,"radius":90,"presetID":2,"preset":"laya/pages/Prefab/4096.prefab"},
             "nodeParent":333,
             "label":"CircleCollider(4096)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/512.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":321,
-    "selecteID":326,
     "searchKey":"Image,512",
     "props":{"y":0,"x":0,"width":150,"skin":"Ball/blast-16.png","presetID":1,"preset":"laya/pages/Prefab/512.prefab","pivotY":75,"pivotX":75,"name":"512","isPresetRoot":true,"height":150},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":75,"presetID":2,"preset":"laya/pages/Prefab/512.prefab"},
+            "props":{"restitution":0.5,"radius":75,"presetID":2,"preset":"laya/pages/Prefab/512.prefab"},
             "nodeParent":321,
             "label":"CircleCollider(512)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/64.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":308,
-    "selecteID":313,
     "searchKey":"Image,64",
     "props":{"y":0,"x":0,"width":120,"skin":"Ball/blast-13.png","presetID":1,"preset":"laya/pages/Prefab/64.prefab","pivotY":60,"pivotX":60,"name":"64","isPresetRoot":true,"height":120},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":60,"presetID":2,"preset":"laya/pages/Prefab/64.prefab"},
+            "props":{"restitution":0.5,"radius":60,"presetID":2,"preset":"laya/pages/Prefab/64.prefab"},
             "nodeParent":308,
             "label":"CircleCollider(64)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/8.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":295,
-    "selecteID":300,
     "searchKey":"Image,8",
     "props":{"y":0,"x":0,"width":90,"skin":"Ball/blast-10.png","presetID":1,"preset":"laya/pages/Prefab/8.prefab","pivotY":45,"pivotX":45,"name":"8","isPresetRoot":true,"height":90},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"restitution":0.6,"radius":45,"presetID":2,"preset":"laya/pages/Prefab/8.prefab"},
+            "props":{"restitution":0.5,"radius":45,"presetID":2,"preset":"laya/pages/Prefab/8.prefab"},
             "nodeParent":295,
             "label":"CircleCollider(8)",
             "isDirectory":false,

+ 1 - 2
laya/pages/Prefab/8192.prefab

@@ -2,7 +2,6 @@
     "x":0,
     "type":"Image",
     "selectedBox":339,
-    "selecteID":344,
     "searchKey":"Image,8192",
     "props":{"y":0,"x":0,"width":190,"skin":"Ball/blast-20.png","presetID":1,"preset":"laya/pages/Prefab/8192.prefab","pivotY":95,"pivotX":95,"name":"8192","isPresetRoot":true,"height":190},
     "nodeParent":-1,
@@ -20,7 +19,7 @@
             "switchAble":true,
             "searchKey":"CircleCollider",
             "removeAble":true,
-            "props":{"y":0,"x":0,"restitution":0.6,"radius":95,"presetID":2,"preset":"laya/pages/Prefab/8192.prefab"},
+            "props":{"y":0,"x":0,"restitution":0.5,"radius":95,"presetID":2,"preset":"laya/pages/Prefab/8192.prefab"},
             "nodeParent":339,
             "label":"CircleCollider(8192)",
             "isDirectory":false,

+ 16 - 2
laya/pages/WinView.scene

@@ -2,11 +2,11 @@
     "x":0,
     "type":"Scene",
     "selectedBox":2,
-    "selecteID":7,
+    "selecteID":8,
     "searchKey":"Scene",
     "props":{"width":720,"sceneColor":"#000000","height":1280},
     "nodeParent":-1,
-    "maxID":8,
+    "maxID":9,
     "label":"Scene",
     "isOpen":true,
     "isDirectory":true,
@@ -17,6 +17,20 @@
         {
             "x":15,
             "type":"Image",
+            "searchKey":"Image,BG",
+            "props":{"var":"BG","top":0,"skin":"WinView/black.png","sizeGrid":"12,14,12,12","right":0,"left":0,"bottom":0},
+            "nodeParent":2,
+            "label":"BG",
+            "isDirectory":false,
+            "isAniNode":true,
+            "hasChild":false,
+            "compId":8,
+            "child":[
+                ]
+        },
+        {
+            "x":15,
+            "type":"Image",
             "searchKey":"Image",
             "props":{"y":17,"x":0,"skin":"WinView/guoguan-1-1.png"},
             "nodeParent":2,

+ 1 - 1
src/GameConfig.ts

@@ -14,7 +14,7 @@ export default class GameConfig{
     static sceneRoot:string="";
     static debug:boolean=false;
     static stat:boolean=false;
-    static physicsDebug:boolean=false;
+    static physicsDebug:boolean=true;
     static exportSceneToJson:boolean=true;
     constructor(){}
     static init(){

+ 22 - 11
src/Main/Ball.ts

@@ -44,7 +44,19 @@ export  default class Ball extends Laya.Script{
     }
     
     onUpdate(){
-        // let des = 0;
+        this.CheckLight();
+        if(this.clear){
+            let _rig = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody;
+            let _collider = this.owner.getComponent(Laya.CircleCollider) as Laya.CircleCollider;
+            _collider.isSensor = true;
+            _collider.enabled = false;
+            _rig.enabled = false;
+            this.Move(GameManager.Instance.TargetPosition);
+            this.moved = true;
+        }
+    }
+    //判断光效开关
+    CheckLight(){
         if(this.TargetArray.length>0){
             let num = 0;
             for (let i = 0; i < this.TargetArray.length; i++) {
@@ -53,17 +65,15 @@ export  default class Ball extends Laya.Script{
                     num ++ ;
                 }
             }
-            if(num)
-            this.Light.visible = true;
+            if(num == this.TargetArray.length){
+                this.Light.visible = false;
+            }
+            else{
+                this.Light.visible = true;
+            }
         }
-        if(this.clear){
-            let _rig = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody;
-            let _collider = this.owner.getComponent(Laya.CircleCollider) as Laya.CircleCollider;
-            _collider.isSensor = true;
-            _collider.enabled = false;
-            _rig.enabled = false;
-            this.Move(GameManager.Instance.TargetPosition);
-            this.moved = true;
+        else{
+            this.Light.visible = false;
         }
     }
     //普通模式
@@ -127,6 +137,7 @@ export  default class Ball extends Laya.Script{
     }
     onTriggerEnter(other: any) {
         let targetparent = other.owner;
+        
         if (targetparent.name != "RightCollider" && targetparent.name != "LeftCollider" && targetparent.name != "BottomCollider") {
             let num = targetparent.getChildByName("num") as Laya.FontClip;
             let ownernum = this.owner.getChildByName("num") as Laya.FontClip;

+ 10 - 4
src/Main/GameControl.ts

@@ -5,6 +5,8 @@ import { GamePool } from "../Tool/GamePool";
 
 export class GameControl{
     private static ins:GameControl;
+
+    
     
     constructor(){
         GameControl.ins = this;
@@ -21,16 +23,20 @@ export class GameControl{
     Init(){
         EventManager.StageOn(StageMode.Start,this,this.GameStart)
         EventManager.StageOn(StageMode.Lose,this,this.GameLose)
-        EventManager.StageOn(StageMode.Win,this,this.GmaeWin)
+        EventManager.StageOn(StageMode.Win,this,this.GameWin)
     }
     GameStart(){
         ViewManager.Instance.ShowView(ViewType.InGameView);
         GamePool.Instance.FallDown(30);
     }
     GameLose(){
-
+        Laya.timer.once(3000,this,()=>{
+            ViewManager.Instance.OpenPopView(ViewType.FailureView);
+        })
     }
-    GmaeWin(){
-        ViewManager.Instance.ShowView(ViewType.WinView);
+    GameWin(){
+        Laya.timer.once(3000,this,()=>{
+            ViewManager.Instance.OpenPopView(ViewType.WinView);
+        })
     }
 }

+ 7 - 85
src/Main/GameManager.ts

@@ -1,12 +1,8 @@
-import { JsonManager } from "../Tool/JsonManager";
-import { GameTools } from "../Tool/GameTools";
+import { EventManager,StageMode } from "../Tool/EventManager";
 import { AccountManager } from "../Net/AccountManager";
-export  class GameManager  {
-    private static ins:GameManager;
 
-    public BallPrefab:string[] = new Array<string>("2","4","8","16","32","64","128","256","512","1024","2048","4096","8192","16384");
-    //球预制体数组
-    public PrefabControl:Laya.Prefab[] = [];
+export class GameManager{
+    private static ins:GameManager;
     //记录本关卡的进度分数
     public ScoreProgress:number = 0;
     //目标点
@@ -24,12 +20,10 @@ export  class GameManager  {
    public FallDownLine:number = 500;
    //当前关卡
    public STAGE:number = 0;
-
     constructor(){
         GameManager.ins = this;
-        this.Init();
+        EventManager.StageOn(StageMode.Start,this,this.Start)
     }
-   
     public static get Instance():GameManager{
         if(GameManager.ins){
             return GameManager.ins
@@ -38,80 +32,8 @@ export  class GameManager  {
             return new GameManager();
         }
     }
-    Init(){
-        // let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
-        // this.STAGE = Number(stage);
-
-        // for (let i = 0; i < 14; i++) {
-        //     this.ReadJSON(i);
-        // }
-    }
-    // ReadJSON(i:number){
-    //     Laya.loader.create("Prefab/"+this.BallPrefab[i]+".json",Laya.Handler.create(this,this.creat));
-    // }
-    // creat(Prefab:any){
-    //     let obj = new Laya.Prefab();
-    //     obj.json = Prefab;
-    //     this.PrefabControl.push(obj);
-    // }
-    // /**创建球预制体 */
-    // CreatPrefab(id:number,_pos:Laya.Vector2){
-    //    let ball = this.PrefabControl[id];
-    //    let pre = Laya.Pool.getItemByCreateFun(this.BallPrefab[id],ball.create,ball) as Laya.Image;
-    //    pre.pos(_pos.x,_pos.y);
-    // //    this.InGameView.prefabbox.addChild(pre);
-    //    this.Cloned = true;
-    // }
-    // //测试用克隆方法
-    // CreatPrefab2(id:number,_pos:Laya.Vector2){
-    //    let ball = this.PrefabControl[id];
-    //    let pre = Laya.Pool.getItemByCreateFun(this.BallPrefab[id],ball.create,ball) as Laya.Image;
-    //    pre.pos(_pos.x,_pos.y);
-    // //    this.InGameView. prefabbox.addChild(pre);
-    // }
-    // /** 根据分数判断克隆哪种球体*/
-    // PrecossData(_num:number):number{
-    //     for (let i = 0; i < this.BallPrefab.length; i++) {
-    //         if(_num == Number(this.BallPrefab[i]) ){
-    //             return i
-    //         }
-    //         if(_num>Number(this.BallPrefab[i]) && _num<Number(this.BallPrefab[i+1])){
-    //             return i
-    //         }
-    //     }
-    // }
-    // /**通过总分数判断应该加多少分 */
-    // ProcessScore(_num):number{
-    //     for (let i = 0; i < this.BallPrefab.length; i++) {
-    //         if(_num == Number(this.BallPrefab[i]) ){
-    //             return Number(this.BallPrefab[i]);
-    //         }
-    //         if(_num>Number(this.BallPrefab[i]) && _num<Number(this.BallPrefab[i+1])){
-    //             return Number(this.BallPrefab[i])
-    //         }
-    //     }
-    // }
-    // //测试,每隔一段时间掉落两个球
-    // FallDown(_time:number = 2) {
-    //     let level = JsonManager.Level;
-    //     let stage = level[2-1];
-    //     let edge = stage.edge.split(";");
-    //     let min =Number(edge[0]);
-    //     let minnext = Number(edge[1]);
-    //     //获取消除道具中 本局 最小球 及 次小球
-    //     let minball =Number(this.BallPrefab[min-1]);
-    //     let minnextball = Number(this.BallPrefab[minnext-1]);
-    //     this.MinBall = minball;
-    //     this.MinNextBall = minnextball;
+    Start(){
         
-    //     let max =Number(edge[edge.length-1]);
-    //     for (let j = 0; j < _time; j++) {
-    //         let num = GameTools.RandomANumber(min,max+1);
-    //         let X = GameTools.RandomANumber(100,500);
-    //         let pos = new Laya.Vector2(X, -30);
-    //         this.CreatPrefab2(num-1,pos);
-    //     }
-    // }
-    
-    
+    }
+
 }

+ 1 - 1
src/Tool/EventManager.ts

@@ -1,7 +1,7 @@
 //道具种类
 export enum PropEffecf{NONE,DOUBLE,HAMMER,UP,CLEARLAST,CLEARTWO }
 //舞台状态
-export enum StageMode{Start,Lose,Win,Clone};
+export enum StageMode{ReStart,Start,Lose,Win,Clone};
 export class EventManager{
     private static Instance:Laya.EventDispatcher = new Laya.EventDispatcher();
     public static PropState:PropEffecf = PropEffecf.NONE;

+ 6 - 3
src/View/FailureView.ts

@@ -1,5 +1,5 @@
 import { ui } from "../ui/layaMaxUI";
-import { SC, ViewType } from "./ViewManager";
+import { SC, ViewType, ViewManager } from "./ViewManager";
 import { AccountManager } from "../Net/AccountManager";
 import MainView from "./MainView";
 import { ServerManager, BlastToMerge } from "../Net/ServerManager";
@@ -22,9 +22,11 @@ export default class FailureView extends ui.FailureViewUI implements SC{
         this.BackBtn.clickHandler = Laya.Handler.create(this,this.ClickBack);
         this.TryBtn.clickHandler = Laya.Handler.create(this,this.ClickTry);
         this.height = Laya.stage.height; 
+        this.BG.height = Laya.stage.height;
         Laya.stage.on(Laya.Event.RESIZE,this,()=>
         {
             this.height = Laya.stage.height;
+            this.BG.height = Laya.stage.height;
         })
     }
     Close(){
@@ -41,10 +43,11 @@ export default class FailureView extends ui.FailureViewUI implements SC{
         ServerManager.Instance.SendHttp(BlastToMerge.JieShu,args,Laya.Handler.create(this,this.Try),null);
     }
     BackMain(){
-        // ViewManager.Instance.ShowView(ViewType.MainView);
+        EventManager.StageTrigger(StageMode.ReStart);
+        ViewManager.Instance.ShowView(ViewType.MainView);
     }
     Try(){
-        EventManager.StageTrigger(StageMode.Start);
+        EventManager.StageTrigger(StageMode.ReStart);
     }
     
 

+ 90 - 30
src/View/InGameView.ts

@@ -13,10 +13,16 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
     // public FallDownLine:number = 500;
     //本关卡
     public STAGE:number;
+    //是否弹出失败界面
+    public LoseView = false;
     constructor(){
         super();
         InGameView.ins = this;
         EventManager.StageOn(StageMode.Clone,this,this.AddPrefab);
+        EventManager.StageOn(StageMode.Win,this,this.Win);
+        EventManager.StageOn(StageMode.Lose,this,this.Lose);
+        EventManager.StageOn(StageMode.ReStart,this,this.ReStart);
+        // EventManager.StageOn(StageMode.Lose,this,this.)
     }
     public static get Instance():InGameView{
         if(InGameView.ins){
@@ -29,13 +35,13 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
     Show(){
         let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
         this.STAGE = Number(stage);
-        Laya.timer.once(200,this,()=>{
-            this.SkillRefresh();
-        })
+
+        Laya.timer.once(200,this,this.SkillRefresh)
         Laya.timer.frameLoop(2,this,this.CheckHeight);
         Laya.timer.frameLoop(1,this,this.Progress);
+        Laya.timer.frameLoop(100,this,this.CheckLose);
+        Laya.timer.frameLoop(500,this,this.SkillAnimation);
         this.ScoreRefresh();
-        this.SkillAnimation();
         
         this.arrowbtn.clickHandler = new Laya.Handler(this,this.ClickArrow);
         this.zhunxin1btn.clickHandler = new Laya.Handler(this,this.ClickZhunXin1);
@@ -65,9 +71,25 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
             let num = GameTools.RandomANumber(2,4);
             GamePool.Instance.FallDown(num);
         }
-
     }
-
+    //检测是否游戏失败
+    CheckLose(){
+        if(!this.LoseView){
+            let lose = true;
+            for (let i = 0; i < this.prefabbox.numChildren; i++) {
+                let ball = this.prefabbox.getChildAt(i) as Laya.Image;
+                let light = ball.getChildByName("light") as Laya.Image;
+                if(light.visible){
+                    lose = false;
+                }
+            }
+            if(lose){
+                this.LoseView = true;
+                EventManager.StageTrigger(StageMode.Lose);
+                
+            }
+        }
+    }
     //开局刷新一下过关要求
     ScoreRefresh(){
         let level = JsonManager.Level;
@@ -96,27 +118,25 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
         this.ani5.play(null,false);
     }
     //技能图标动画效果
-    SkillAnimation(){
-        Laya.timer.frameLoop(500, this, () => {
-            let random = GameTools.RandomANumber(1, 6);
-            switch (random) {
-                case 1:
-                    this.ani1.play(null, false);
-                    break;
-                case 2:
-                    this.ani2.play(null, false);
-                    break;
-                case 3:
-                    this.ani3.play(null, false);
-                    break;
-                case 4:
-                    this.ani4.play(null, false);
-                    break;
-                case 5:
-                    this.ani5.play(null, false);
-                    break;
-            }
-        })
+    SkillAnimation() {
+        let random = GameTools.RandomANumber(1, 6);
+        switch (random) {
+            case 1:
+                this.ani1.play(null, false);
+                break;
+            case 2:
+                this.ani2.play(null, false);
+                break;
+            case 3:
+                this.ani3.play(null, false);
+                break;
+            case 4:
+                this.ani4.play(null, false);
+                break;
+            case 5:
+                this.ani5.play(null, false);
+                break;
+        }
     }
     //比例
     private get Ratio():number{
@@ -133,8 +153,8 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
         if(GameManager.Instance.ScoreProgress>Number(this.RequireScore.text)){
             GameManager.Instance.ScoreProgress = Number(this.RequireScore.text);
             this.NowScore.text = GameManager.Instance.ScoreProgress.toString();
-            // EventManager.StageTrigger(StageMode.Win);
-            // return
+            EventManager.StageTrigger(StageMode.Win);
+            return
         }
         this.NowScore.text = GameManager.Instance.ScoreProgress.toString();
     }
@@ -280,7 +300,47 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
         this.EffectBtn.clickHandler = null;
         EventManager.PropState = PropEffecf.NONE;
     }
-
+    //清除舞台上的球
+    ClearStage(){
+        let num = 0;
+        for (let i = this.prefabbox.numChildren-1; i > -1; i--) {
+            let ball = this.prefabbox.getChildAt(i) as Laya.Image;
+            Laya.timer.clearAll(ball);
+            let _rig = ball.getComponent(Laya.RigidBody) as Laya.RigidBody;
+            let _collider = ball.getComponent(Laya.CircleCollider) as Laya.CircleCollider;
+            _collider.enabled = false;
+            _rig.enabled = false;
+            ball.removeSelf();
+            ball.destroy();
+            num++;
+        }
+        //清除碰撞器
+        this.ClearCollider(this.BottomCollider);
+        this.ClearCollider(this.RightCollider);
+        this.ClearCollider(this.LeftCollider);
+    }
+    //游戏胜利
+    Win(){
+        Laya.timer.clear(this,this.CheckHeight);
+    }
+    //游戏失败
+    Lose(){
+        Laya.timer.clear(this,this.CheckHeight);
+    }
+    //舞台重置
+    ReStart(){
+        this.ClearStage();
+    }
+    //清除碰撞器
+    ClearCollider(_node:Laya.Image){
+        let collier = _node.getComponent(Laya.ChainCollider) as Laya.ChainCollider;
+        let rig = _node.getComponent(Laya.RigidBody) as Laya.RigidBody;
+        collier.enabled = false;
+        rig.enabled = false;
+        _node.removeSelf();
+        _node.destroy();
+    }
+    
     Close(){
         
     }

+ 5 - 1
src/View/MainView.ts

@@ -12,7 +12,8 @@ export default class MainView extends ui.MainSceneUI implements SC{
     private static ins:MainView;
     //游戏开始接口返回的游戏id
     public play_id:any;
-    
+    //当前关卡数
+    public STAGE:number = 0;
 
     constructor(){
         super();
@@ -29,6 +30,9 @@ export default class MainView extends ui.MainSceneUI implements SC{
         }
     }
     Show(){
+        let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
+        this.STAGE = Number(stage);
+        GameManager.Instance.STAGE = this.STAGE;
         this.StartBtn.clickHandler = Laya.Handler.create(this,this.ClickStart);
         this.RankBtn.clickHandler = Laya.Handler.create(this,this.ClickRank);
         this.SignBtn.clickHandler = Laya.Handler.create(this,this.ClickSign);

+ 40 - 0
src/View/ViewManager.ts

@@ -7,6 +7,7 @@ import LotteryView from "./LotteryView";
 import FailureView from "./FailureView";
 import WinView from "./WinView";
 import ReviveView from "./ReviveView";
+import GuangGao from "../Net/GuangGao";
 
 
 export enum ViewType{MainView,SignView,SetView,LotteryView,InGameView,RankView,WinView,FailureView,ReviveView};
@@ -17,6 +18,8 @@ export interface SC{
 }
 export class ViewManager{
     private static ins:ViewManager;
+    public ViewDic:[any][any] = [];
+    public OtherViewDic:[any][any] = [];
     public ViewSprite:Laya.Sprite = new Laya.Sprite();
     public OtherViewSprite:Laya.Sprite = new Laya.Sprite();
     public curView:any;
@@ -39,6 +42,7 @@ export class ViewManager{
             this.curView.destroy();
             this.curView.removeSelf();
         }
+        this.ClearPopViews();
         this.curView = this.CreateView(_viewtype);
         this.curView.name = ViewType[_viewtype];
         this.ViewSprite.addChild(this.curView);
@@ -51,6 +55,40 @@ export class ViewManager{
             this.curView.removeSelf();
         }
     }
+     //全屏导出页
+    public OpenPopView(viewType: ViewType, data: any = null)  {
+        GuangGao.Clear();
+        var popView;
+        if (this.OtherViewDic[viewType])  {
+            popView = this.OtherViewDic[viewType];
+
+            this.OtherViewSprite.setChildIndex(popView, this.OtherViewSprite.numChildren - 1);
+            popView.visible = true;
+        }
+        else  {
+            popView = this.CreateView(viewType);
+            this.OtherViewSprite.addChild(popView);
+            this.OtherViewDic[viewType] = popView;
+        }
+        popView.Show(data);
+    }
+
+    public ClosePopView(viewType: ViewType)  {
+        var popView = this.OtherViewDic[viewType];
+        if (popView == null) {
+            return;
+        }
+        GuangGao.Clear();
+        popView.Close();
+        popView.visible = false;
+    }
+
+    ClearPopViews()  {
+        GuangGao.Clear();
+        this.ClosePopView(ViewType.WinView);
+        this.ClosePopView(ViewType.FailureView);
+        //this.ClosePopView(ViewType.NewRewardView);
+    }
     CreateView(_viewtype:ViewType){
         switch (_viewtype) {
             case ViewType.MainView:
@@ -75,4 +113,6 @@ export class ViewManager{
         return null;
     }
 
+   
+
 }

+ 4 - 1
src/View/WinView.ts

@@ -21,9 +21,11 @@ export default class WinView extends ui.WinViewUI implements SC{
     Show(){
         this.BackBtn.clickHandler = Laya.Handler.create(this,this.ClickBack);
         this.height = Laya.stage.height; 
+        this.BG.height = Laya.stage.height;
         Laya.stage.on(Laya.Event.RESIZE,this,()=>
         {
             this.height = Laya.stage.height;
+            this.BG.height = Laya.stage.height;
         })
     }
     Close(){
@@ -41,11 +43,12 @@ export default class WinView extends ui.WinViewUI implements SC{
     }
     //返回主界面
     BackMain(){
+        EventManager.StageTrigger(StageMode.ReStart);
         ViewManager.Instance.ShowView(ViewType.MainView);
     }
     //下一关
     NextLevel(){
-        EventManager.StageTrigger(StageMode.Start);
+        EventManager.StageTrigger(StageMode.ReStart);
     }
 
 } 

Diferenças do arquivo suprimidas por serem muito extensas
+ 9 - 4
src/ui/layaMaxUI.ts