Explorar o código

修改文件层级

mojunshou hai 7 meses
pai
achega
2aeb56ad52
Modificáronse 63 ficheiros con 3694 adicións e 1614 borrados
  1. 0 12
      assets/bundle/gui/demo.meta
  2. 0 322
      assets/bundle/gui/demo/demo.prefab
  3. 0 13
      assets/bundle/gui/demo/demo.prefab.meta
  4. 961 217
      assets/bundle/gui/eliminate/eliminate.prefab
  5. 106 245
      assets/bundle/gui/eliminate/prefab/cashRebate.prefab
  6. 1910 343
      assets/bundle/gui/eliminate/prefab/gamePass.prefab
  7. 4 2
      assets/script/Main.ts
  8. 25 0
      assets/script/game/Game.ts
  9. 1 1
      assets/script/game/account/view/DemoViewComp.ts.meta
  10. 21 114
      assets/script/game/account/model/AccountModelComp.ts
  11. 0 12
      assets/script/game/account/view.meta
  12. 0 18
      assets/script/game/account/view/DemoViewComp.ts
  13. 0 0
      assets/script/game/bll.meta
  14. 5 3
      assets/script/game/common/SingletonModuleComp.ts
  15. 22 0
      assets/script/game/common/config/GameDefine.ts
  16. 9 0
      assets/script/game/common/config/GameDefine.ts.meta
  17. 75 4
      assets/script/game/common/manager/CocosHandler.ts
  18. 5 5
      assets/script/game/common/tips/KindTipsView.ts
  19. 5 5
      assets/script/game/common/tips/RetentionView.ts
  20. 0 0
      assets/script/game/config.meta
  21. 0 0
      assets/script/game/config/GameData.ts
  22. 0 0
      assets/script/game/config/GameData.ts.meta
  23. 0 9
      assets/script/game/eliminate.meta
  24. 0 9
      assets/script/game/eliminate/block.meta
  25. 0 30
      assets/script/game/eliminate/view/GamePassView.ts
  26. 5 4
      assets/script/game/initialize/view/LoadingViewComp.ts
  27. 0 0
      assets/script/game/model.meta
  28. 168 0
      assets/script/game/model/GameModelComp.ts
  29. 9 0
      assets/script/game/model/GameModelComp.ts.meta
  30. 0 0
      assets/script/game/ui.meta
  31. 0 0
      assets/script/game/ui/List.ts
  32. 0 0
      assets/script/game/ui/List.ts.meta
  33. 0 0
      assets/script/game/ui/ListItem.ts
  34. 0 0
      assets/script/game/ui/ListItem.ts.meta
  35. 0 0
      assets/script/game/view.meta
  36. 6 6
      assets/script/game/eliminate/view/CashRebateView.ts
  37. 0 0
      assets/script/game/view/CashRebateView.ts.meta
  38. 18 1
      assets/script/game/eliminate/view/CashWithdrawalView.ts
  39. 0 0
      assets/script/game/view/CashWithdrawalView.ts.meta
  40. 0 0
      assets/script/game/view/DoubleRewardsView.ts
  41. 0 0
      assets/script/game/view/DoubleRewardsView.ts.meta
  42. 4 7
      assets/script/game/eliminate/view/DoubleSpeedViewComp.ts
  43. 0 0
      assets/script/game/view/DoubleSpeedViewComp.ts.meta
  44. 210 196
      assets/script/game/eliminate/view/EliminateViewComp.ts
  45. 0 0
      assets/script/game/view/EliminateViewComp.ts.meta
  46. 3 3
      assets/script/game/eliminate/view/GameOverView.ts
  47. 0 0
      assets/script/game/view/GameOverView.ts.meta
  48. 99 0
      assets/script/game/view/GamePassView.ts
  49. 0 0
      assets/script/game/view/GamePassView.ts.meta
  50. 0 0
      assets/script/game/view/GuildTipsView.ts
  51. 0 0
      assets/script/game/view/GuildTipsView.ts.meta
  52. 2 5
      assets/script/game/eliminate/view/RedPackeItemView.ts
  53. 0 0
      assets/script/game/view/RedPackeItemView.ts.meta
  54. 7 10
      assets/script/game/eliminate/view/RedPackeWithdrawalViewComp.ts
  55. 0 0
      assets/script/game/view/RedPackeWithdrawalViewComp.ts.meta
  56. 0 0
      assets/script/game/view/ReserveView.ts
  57. 0 0
      assets/script/game/view/ReserveView.ts.meta
  58. 0 0
      assets/script/game/view/VerifyView.ts
  59. 0 0
      assets/script/game/view/VerifyView.ts.meta
  60. 6 9
      assets/script/game/eliminate/view/WechatWithdrawalViewComp.ts
  61. 0 0
      assets/script/game/view/WechatWithdrawalViewComp.ts.meta
  62. 8 9
      assets/script/game/eliminate/view/WithdrawalRecordViewComp.ts
  63. 0 0
      assets/script/game/view/WithdrawalRecordViewComp.ts.meta

+ 0 - 12
assets/bundle/gui/demo.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.2.0",
-  "importer": "directory",
-  "imported": true,
-  "uuid": "e05e3ca3-6657-4d57-8c14-544b16c49d9f",
-  "files": [],
-  "subMetas": {},
-  "userData": {
-    "compressionType": {},
-    "isRemoteBundle": {}
-  }
-}

+ 0 - 322
assets/bundle/gui/demo/demo.prefab

@@ -1,322 +0,0 @@
-[
-  {
-    "__type__": "cc.Prefab",
-    "_name": "demo",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_native": "",
-    "data": {
-      "__id__": 1
-    },
-    "optimizationPolicy": 0,
-    "persistent": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "demo",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": null,
-    "_children": [
-      {
-        "__id__": 2
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 8
-      },
-      {
-        "__id__": 10
-      },
-      {
-        "__id__": 12
-      }
-    ],
-    "_prefab": {
-      "__id__": 14
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "Label",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 3
-      },
-      {
-        "__id__": 5
-      }
-    ],
-    "_prefab": {
-      "__id__": 7
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 2
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 4
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 280,
-      "height": 50.4
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "8cipMYj4xDm5jqsrnQfJCt"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 2
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 6
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_string": "自定义游戏内容",
-    "_horizontalAlign": 1,
-    "_verticalAlign": 1,
-    "_actualFontSize": 40,
-    "_fontSize": 40,
-    "_fontFamily": "Arial",
-    "_lineHeight": 40,
-    "_overflow": 0,
-    "_enableWrapText": true,
-    "_font": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_isItalic": false,
-    "_isBold": true,
-    "_isUnderline": false,
-    "_underlineHeight": 2,
-    "_cacheMode": 0,
-    "_enableOutline": false,
-    "_outlineColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_outlineWidth": 2,
-    "_enableShadow": false,
-    "_shadowColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_shadowOffset": {
-      "__type__": "cc.Vec2",
-      "x": 2,
-      "y": 2
-    },
-    "_shadowBlur": 2,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "14G1IpRKxDhIK/DMxZWnuV"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "6a9gw+XudGXJukdnHVeT/r",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 9
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 1200,
-      "height": 720
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "f3S89pdJhH/4R5JY+TQ4fe"
-  },
-  {
-    "__type__": "cc.Widget",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 11
-    },
-    "_alignFlags": 45,
-    "_target": null,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": 0,
-    "_horizontalCenter": 0,
-    "_verticalCenter": 0,
-    "_isAbsLeft": true,
-    "_isAbsRight": true,
-    "_isAbsTop": true,
-    "_isAbsBottom": true,
-    "_isAbsHorizontalCenter": true,
-    "_isAbsVerticalCenter": true,
-    "_originalWidth": 100,
-    "_originalHeight": 100,
-    "_alignMode": 2,
-    "_lockFlags": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "a9Eh9hnWBPCZvjFwuFLNVw"
-  },
-  {
-    "__type__": "78b5dVjj81IxoHGx2PAK8bT",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 13
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "97BmmGMLZJ/LFADpl1Lm1t"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "65vUmrMQhG97zCh9KMiuDH",
-    "instance": null,
-    "targetOverrides": null
-  }
-]

+ 0 - 13
assets/bundle/gui/demo/demo.prefab.meta

@@ -1,13 +0,0 @@
-{
-  "ver": "1.1.50",
-  "importer": "prefab",
-  "imported": true,
-  "uuid": "5b6511a4-181b-4c81-9f9c-51e4c21b4d64",
-  "files": [
-    ".json"
-  ],
-  "subMetas": {},
-  "userData": {
-    "syncNodeName": "demo"
-  }
-}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 961 - 217
assets/bundle/gui/eliminate/eliminate.prefab


+ 106 - 245
assets/bundle/gui/eliminate/prefab/cashRebate.prefab

@@ -23,25 +23,22 @@
       },
       {
         "__id__": 12
-      },
-      {
-        "__id__": 18
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 84
+        "__id__": 78
       },
       {
-        "__id__": 86
+        "__id__": 80
       },
       {
-        "__id__": 88
+        "__id__": 82
       }
     ],
     "_prefab": {
-      "__id__": 90
+      "__id__": 84
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -209,142 +206,6 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "提现返利弹窗",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 13
-      },
-      {
-        "__id__": 15
-      }
-    ],
-    "_prefab": {
-      "__id__": 17
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 12
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 14
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 720,
-      "height": 1600
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "eeXNZWMoBJjpKzoouWIihr"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 12
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 16
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": {
-      "__uuid__": "0b689aa9-ca24-492d-9d7b-ed30daaae3a3@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_type": 0,
-    "_fillType": 0,
-    "_sizeMode": 1,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "da/wwULnZPBJBe2mC0tzZE"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "8bbK2hr8dFg4VXIE/RkPaQ",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
-  {
-    "__type__": "cc.Node",
     "_name": "Sprite",
     "_objFlags": 0,
     "__editorExtras__": {},
@@ -353,32 +214,32 @@
     },
     "_children": [
       {
-        "__id__": 19
+        "__id__": 13
       },
       {
-        "__id__": 25
+        "__id__": 19
       },
       {
-        "__id__": 33
+        "__id__": 27
       },
       {
-        "__id__": 51
+        "__id__": 45
       },
       {
-        "__id__": 65
+        "__id__": 59
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 79
+        "__id__": 73
       },
       {
-        "__id__": 81
+        "__id__": 75
       }
     ],
     "_prefab": {
-      "__id__": 83
+      "__id__": 77
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -415,20 +276,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 18
+      "__id__": 12
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 20
+        "__id__": 14
       },
       {
-        "__id__": 22
+        "__id__": 16
       }
     ],
     "_prefab": {
-      "__id__": 24
+      "__id__": 18
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -465,11 +326,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 19
+      "__id__": 13
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 21
+      "__id__": 15
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -493,11 +354,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 19
+      "__id__": 13
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 23
+      "__id__": 17
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -551,23 +412,23 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 18
+      "__id__": 12
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 26
+        "__id__": 20
       },
       {
-        "__id__": 28
+        "__id__": 22
       },
       {
-        "__id__": 30
+        "__id__": 24
       }
     ],
     "_prefab": {
-      "__id__": 32
+      "__id__": 26
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -604,11 +465,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 25
+      "__id__": 19
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 27
+      "__id__": 21
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -632,11 +493,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 25
+      "__id__": 19
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 29
+      "__id__": 23
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -700,11 +561,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 25
+      "__id__": 19
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 31
+      "__id__": 25
     },
     "_params": [],
     "_dataID": "casheRebate_content",
@@ -733,27 +594,27 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 18
+      "__id__": 12
     },
     "_children": [
       {
-        "__id__": 34
+        "__id__": 28
       },
       {
-        "__id__": 40
+        "__id__": 34
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 46
+        "__id__": 40
       },
       {
-        "__id__": 48
+        "__id__": 42
       }
     ],
     "_prefab": {
-      "__id__": 50
+      "__id__": 44
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -790,20 +651,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 33
+      "__id__": 27
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 35
+        "__id__": 29
       },
       {
-        "__id__": 37
+        "__id__": 31
       }
     ],
     "_prefab": {
-      "__id__": 39
+      "__id__": 33
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -840,11 +701,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 34
+      "__id__": 28
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 36
+      "__id__": 30
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -868,11 +729,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 34
+      "__id__": 28
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 38
+      "__id__": 32
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -949,20 +810,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 33
+      "__id__": 27
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 41
+        "__id__": 35
       },
       {
-        "__id__": 43
+        "__id__": 37
       }
     ],
     "_prefab": {
-      "__id__": 45
+      "__id__": 39
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -999,11 +860,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 40
+      "__id__": 34
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 42
+      "__id__": 36
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1027,11 +888,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 40
+      "__id__": 34
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 44
+      "__id__": 38
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1108,11 +969,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 33
+      "__id__": 27
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 47
+      "__id__": 41
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1136,11 +997,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 33
+      "__id__": 27
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 49
+      "__id__": 43
     },
     "_resizeMode": 1,
     "_layoutType": 1,
@@ -1187,27 +1048,27 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 18
+      "__id__": 12
     },
     "_children": [
       {
-        "__id__": 52
+        "__id__": 46
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 52
       },
       {
-        "__id__": 60
+        "__id__": 54
       },
       {
-        "__id__": 62
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 64
+      "__id__": 58
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1244,20 +1105,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 51
+      "__id__": 45
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 53
+        "__id__": 47
       },
       {
-        "__id__": 55
+        "__id__": 49
       }
     ],
     "_prefab": {
-      "__id__": 57
+      "__id__": 51
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1294,11 +1155,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 52
+      "__id__": 46
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 54
+      "__id__": 48
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1322,11 +1183,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 52
+      "__id__": 46
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 56
+      "__id__": 50
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1403,11 +1264,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 51
+      "__id__": 45
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 59
+      "__id__": 53
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1431,11 +1292,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 51
+      "__id__": 45
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 61
+      "__id__": 55
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1476,11 +1337,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 51
+      "__id__": 45
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 63
+      "__id__": 57
     },
     "clickEvents": [],
     "_interactable": true,
@@ -1532,7 +1393,7 @@
     "_duration": 0.1,
     "_zoomScale": 1.2,
     "_target": {
-      "__id__": 51
+      "__id__": 45
     },
     "_id": ""
   },
@@ -1559,27 +1420,27 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 18
+      "__id__": 12
     },
     "_children": [
       {
-        "__id__": 66
+        "__id__": 60
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 72
+        "__id__": 66
       },
       {
-        "__id__": 74
+        "__id__": 68
       },
       {
-        "__id__": 76
+        "__id__": 70
       }
     ],
     "_prefab": {
-      "__id__": 78
+      "__id__": 72
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1616,20 +1477,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 65
+      "__id__": 59
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 67
+        "__id__": 61
       },
       {
-        "__id__": 69
+        "__id__": 63
       }
     ],
     "_prefab": {
-      "__id__": 71
+      "__id__": 65
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1666,11 +1527,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 66
+      "__id__": 60
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 68
+      "__id__": 62
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1694,11 +1555,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 66
+      "__id__": 60
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 70
+      "__id__": 64
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1775,11 +1636,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 65
+      "__id__": 59
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 73
+      "__id__": 67
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1803,11 +1664,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 65
+      "__id__": 59
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 75
+      "__id__": 69
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1848,11 +1709,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 65
+      "__id__": 59
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 77
+      "__id__": 71
     },
     "clickEvents": [],
     "_interactable": true,
@@ -1895,7 +1756,7 @@
     "_duration": 0.1,
     "_zoomScale": 1.2,
     "_target": {
-      "__id__": 65
+      "__id__": 59
     },
     "_id": ""
   },
@@ -1922,11 +1783,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 18
+      "__id__": 12
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 80
+      "__id__": 74
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1950,11 +1811,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 18
+      "__id__": 12
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 82
+      "__id__": 76
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2012,7 +1873,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 85
+      "__id__": 79
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2040,7 +1901,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 87
+      "__id__": 81
     },
     "_alignFlags": 45,
     "_target": null,
@@ -2076,7 +1937,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 89
+      "__id__": 83
     },
     "_id": ""
   },

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1910 - 343
assets/bundle/gui/eliminate/prefab/gamePass.prefab


+ 4 - 2
assets/script/Main.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: dgflash
  * @Date: 2021-07-03 16:13:17
- * @LastEditors: dgflash
- * @LastEditTime: 2022-08-05 18:25:56
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-10 15:20:58
  */
 import { _decorator, profiler } from 'cc';
 import { DEBUG } from 'cc/env';
@@ -13,6 +13,7 @@ import { Account } from './game/account/Account';
 import { smc } from './game/common/SingletonModuleComp';
 import { UIConfigData } from './game/common/config/GameUIConfig';
 import { Initialize } from './game/initialize/Initialize';
+import { Game } from './game/Game';
 
 const { ccclass, property } = _decorator;
 
@@ -25,6 +26,7 @@ export class Main extends Root {
     protected run() {
         smc.initialize = ecs.getEntity<Initialize>(Initialize);
         smc.account = ecs.getEntity<Account>(Account);
+        smc.game = ecs.getEntity<Game>(Game)
     }
 
     protected initGui() {

+ 25 - 0
assets/script/game/Game.ts

@@ -0,0 +1,25 @@
+import { ecs } from "db://oops-framework/libs/ecs/ECS";
+import { GameModelComp } from "./model/GameModelComp";
+import { EliminateViewComp } from "./view/EliminateViewComp";
+
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-10 15:19:17
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-10 15:22:37
+ * @Description: 
+ */
+@ecs.register('Game')
+export class Game extends ecs.Entity {
+    GameModel!: GameModelComp;
+
+    eliminateView!: EliminateViewComp;
+
+
+    protected init() {
+        this.addComponents<ecs.Comp>(GameModelComp);
+    }
+
+
+
+}

+ 1 - 1
assets/script/game/account/view/DemoViewComp.ts.meta

@@ -2,7 +2,7 @@
   "ver": "4.0.24",
   "importer": "typescript",
   "imported": true,
-  "uuid": "78b5d563-8fcd-48c6-81c6-c763c02bc6d3",
+  "uuid": "d5b781b0-0e57-4f68-a56a-038b87fc2cc6",
   "files": [],
   "subMetas": {},
   "userData": {}

+ 21 - 114
assets/script/game/account/model/AccountModelComp.ts

@@ -4,7 +4,7 @@
  * @Author: dgflash
  * @Date: 2021-11-12 10:02:31
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 17:32:45
+ * @LastEditTime: 2025-04-10 15:24:29
  */
 import { oops } from "db://oops-framework/core/Oops";
 import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
@@ -13,35 +13,6 @@ import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs
  * 游戏账号数据 
  */
 
-interface CurLevelInfo {
-    level: number;
-    score: number;
-}
-
-
-
-interface CurLevelConfig {
-    level: number;        //当前关卡    
-    score: number;        //当前关卡目标分数
-    skipCount: number;    //当前关卡跳过次数
-    eliminateScope: [];   //消除配置
-    eventType: string      //消除配置
-}
-
-//费用配置
-interface CostInfo {
-    handlingCharge: number; //处理费
-    giftNum: number;         //赠送金
-}
-
-interface RecordInfo {
-    title: string,
-    amount: number,
-    payMethod: number,
-    createTime: number,
-    successTime: number,
-    status: number
-}
 
 
 
@@ -63,26 +34,30 @@ export class AccountModelComp extends ecs.Comp {
     _cashCoin: number = 0;
     /**金块*/
     _goldCoin: number = 0;
-    /**手续费*/
-    _handlingCharge: number = 0;
-    /**当前分数*/
-    _curScore: number = 0;
-    /**目标分数*/
-    _targetScore: number = 0;
-    /**协议类型 1隐私 2用户*/
-    _protocolType: number = 1;
-    //当前关卡信息
-    _curLevelInfo: CurLevelInfo = null!;
-    /**当前关卡配置*/
-    _curLevelConfig: CurLevelConfig = null!;
-    /**游戏费用配置*/
-    _costInfo: CostInfo = null!;
     /**是否登录过*/
     _isLogined: boolean = false;
-    //提现记录
-    _recordList: RecordInfo[] = [];
 
 
+    // /**手续费*/
+    // _handlingCharge: number = 0;
+    // /**当前分数*/
+    // _curScore: number = 0;
+    // /**目标分数*/
+    // _targetScore: number = 0;
+    // /**协议类型 1隐私 2用户*/
+    // _protocolType: number = 1;
+    // //当前关卡信息
+    // _curLevelInfo: CurLevelInfo = null!;
+    // /**当前关卡配置*/
+    // _curLevelConfig: CurLevelConfig = null!;
+    // /**游戏费用配置*/
+    // _costInfo: CostInfo = null!;
+    // //提现记录
+    // _recordList: RecordInfo[] = [];
+
+    // //是否是广告时间
+    // _isShowAd: boolean = false;
+
 
 
     reset() {
@@ -92,10 +67,6 @@ export class AccountModelComp extends ecs.Comp {
         this.curLevel = 0;
         this.gameCoin = 0;
         this.cashCoin = 0;
-        this.protocolType = 1;
-        this.curLevelInfo = null!;
-        this.curLevelConfig = null!;
-        this.costInfo = null!;
     }
 
 
@@ -156,64 +127,6 @@ export class AccountModelComp extends ecs.Comp {
         this._goldCoin = value;
     }
 
-    get handlingCharge() {
-        return this._handlingCharge;
-    }
-
-    set handlingCharge(value: number) {
-        this._handlingCharge = value;
-    }
-
-    set curScore(value: number) {
-        this._curScore = value;
-    }
-
-    get curScore() {
-        return this._curScore;
-    }
-
-
-
-    get targetScore() {
-        return this._targetScore;
-    }
-
-    set targetScore(value: number) {
-        this._targetScore = value;
-    }
-
-    get protocolType() {
-        return this._protocolType;
-    }
-
-    set protocolType(value: number) {
-        this._protocolType = value;
-    }
-
-    get curLevelInfo() {
-        return this._curLevelInfo;
-    }
-
-    set curLevelInfo(value: CurLevelInfo) {
-        this._curLevelInfo = value;
-    }
-
-    get curLevelConfig() {
-        return this._curLevelConfig;
-    }
-
-    set curLevelConfig(value: CurLevelConfig) {
-        this._curLevelConfig = value;
-    }
-
-    get costInfo() {
-        return this._costInfo;
-    }
-
-    set costInfo(value: CostInfo) {
-        this._costInfo = value;
-    }
-
     get isLogined() {
         return this._isLogined;
     }
@@ -222,12 +135,6 @@ export class AccountModelComp extends ecs.Comp {
         this._isLogined = value;
     }
 
-    get recordList() {
-        return this._recordList;
-    }
 
-    set recordList(value: RecordInfo[]) {
-        this.recordList = value;
-    }
 
 }

+ 0 - 12
assets/script/game/account/view.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.2.0",
-  "importer": "directory",
-  "imported": true,
-  "uuid": "2c878291-495b-4425-8c81-d3613cfd5ccc",
-  "files": [],
-  "subMetas": {},
-  "userData": {
-    "compressionType": {},
-    "isRemoteBundle": {}
-  }
-}

+ 0 - 18
assets/script/game/account/view/DemoViewComp.ts

@@ -1,18 +0,0 @@
-import { _decorator } from "cc";
-import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
-import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
-
-const { ccclass, property } = _decorator;
-
-/** 视图层对象 */
-@ccclass('DemoViewComp')
-@ecs.register('DemoView', false)
-export class DemoViewComp extends CCComp {
-    start() {
-
-    }
-
-    reset() {
-        this.node.destroy();
-    }
-}

assets/script/game/eliminate/bll.meta → assets/script/game/bll.meta


+ 5 - 3
assets/script/game/common/SingletonModuleComp.ts

@@ -1,12 +1,13 @@
 /*
  * @Author: dgflash
  * @Date: 2021-11-18 14:20:46
- * @LastEditors: dgflash
- * @LastEditTime: 2022-08-08 12:04:30
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-10 15:27:08
  */
 
 import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
 import { Account } from "../account/Account";
+import { Game } from "../Game";
 import { Initialize } from "../initialize/Initialize";
 
 /** 游戏单例业务模块 */
@@ -16,7 +17,8 @@ export class SingletonModuleComp extends ecs.Comp {
     initialize: Initialize = null!;
     /** 游戏账号模块 */
     account: Account = null!;
-
+    /**游戏数据模块*/
+    game: Game = null!
     reset() { }
 }
 

+ 22 - 0
assets/script/game/common/config/GameDefine.ts

@@ -0,0 +1,22 @@
+export enum AD_TYPE {
+    //启屏广告
+    Start = "101",
+    //冷启动进入首页
+    Jion_Main = "102",
+    //双倍领取
+    Double_Receive = "103",
+    //翻倍奖励弹窗关闭
+    Double_Close = "104",
+    //提现返利弹窗收下
+    Rebates = "105",
+    //二倍速领取
+    Double_Speed_Receive = "106",
+    //二倍速关闭--插屏
+    Double_Speed_Close = "107",
+    //游戏复活ID--
+    Resurrection = "108",
+    //通关奖励领取
+    Pass_Receive = "109",
+
+
+}

+ 9 - 0
assets/script/game/common/config/GameDefine.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "eab15160-c04b-4bda-a936-3280d4fa7742",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 75 - 4
assets/script/game/common/manager/CocosHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-31 10:45:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:53:56
+ * @LastEditTime: 2025-04-10 10:48:20
  * @Description: CocosHandler 处理类负责与安卓交互
  */
 import { native } from 'cc';
@@ -16,6 +16,7 @@ import { ProtocolEvent } from './ProtocolEvent';
 import { AndroidEvent } from '../config/AndroidEvent';
 import { UIID } from '../config/GameUIConfig';
 import { get } from 'http';
+import { AD_TYPE } from '../config/GameDefine';
 const { ccclass, property } = _decorator;
 
 type CocosHandlerType = {
@@ -298,6 +299,71 @@ export class CocosHandler {
     }
     //=================================以下是广告方法====================
     //每次启动都加载一次启屏广告
+
+    //显示广告
+    async show_ad(id: string) {
+        const data: CocosHandlerType = {
+            method: "",
+            param: ""
+        }
+        const param = {
+            "funcId": "",
+            "callback":
+            {
+                "onLoaded": "",
+                "onShow": "",
+                "onLoadFailed": "",
+                "onShowFailed": "",
+                "onClose": ""
+            }
+        }
+        switch (id) {
+            //启屏广告
+            case AD_TYPE.Start:
+                param.funcId = id;
+                param.callback.onShowFailed = "CocosHandler.inst.ad_splash_onShowFailed";
+                param.callback.onClose = "CocosHandler.inst.ad_splash_close";
+                data.method = "ad.splash";
+                break;
+            //插屏广告
+            case AD_TYPE.Jion_Main:
+            case AD_TYPE.Double_Close:
+            case AD_TYPE.Rebates:
+            case AD_TYPE.Double_Speed_Close:
+                param.funcId = id;
+                data.method = "ad.interstitial";
+                param.callback.onClose = "CocosHandler.inst.ad_interstitial_close";
+                param.callback.onShowFailed = "CocosHandler.inst.ad_interstitial_show_failed";
+                break;
+            //激励广告
+            case AD_TYPE.Double_Receive:
+            case AD_TYPE.Double_Speed_Receive:
+            case AD_TYPE.Pass_Receive:
+            case AD_TYPE.Resurrection:
+                param.funcId = id;
+                data.method = "ad.reward"
+                param.callback.onClose = "CocosHandler.inst.ad_reward_close";
+                param.callback.onShowFailed = "CocosHandler.inst.ad_reward_onShowFailed"
+
+                break;
+
+
+
+        }
+
+
+
+
+
+
+        data.param = JSON.stringify(param);
+        let result = await this.sendMessageToAndroid(data);
+        console.log("广告ID", id, "广告返回数据", result);
+        return result;
+
+    }
+
+
     async ad_interstitial_start() {
         const param = {
             "funcId": "101",
@@ -338,9 +404,6 @@ export class CocosHandler {
     }
 
 
-
-
-
     //广告请求--插屏广告
     async ad_interstitial(code: string) {
         const param = {
@@ -404,6 +467,14 @@ export class CocosHandler {
     //激励视频广告关闭回调
     ad_reward_close(str: string) {
         console.log("激励视频广告关闭回调", str);
+
+
+        //返回通知主场景,告诉要不要发奖励
+    }
+
+    //激励视频显示失败回调
+    ad_reward_onShowFailed(str: string) {
+        console.log("激励视频显示失败回调", str);
     }
 
 }

+ 5 - 5
assets/script/game/common/tips/KindTipsView.ts

@@ -5,13 +5,12 @@
  * @LastEditTime: 2025-04-09 10:26:25
  * @Description: 温馨提示弹窗
  */
-import { _decorator, Component, Node } from 'cc';
+import { _decorator } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
+import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
+import { AD_TYPE } from '../config/GameDefine';
 import { UIID } from '../config/GameUIConfig';
-import { sys } from 'cc';
-import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
-import { AndroidEvent } from '../config/AndroidEvent';
 import { CocosHandler } from '../manager/CocosHandler';
 const { ccclass, property } = _decorator;
 
@@ -24,7 +23,8 @@ export class KindTipsView extends GameComponent {
     private async btn_agree() {
         console.log("同意");
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.ad_interstitial_start();
+            // CocosHandler.inst.ad_interstitial_start();
+            CocosHandler.inst.show_ad(AD_TYPE.Start);
             oops.gui.remove(UIID.KindTips);
         }
     }

+ 5 - 5
assets/script/game/common/tips/RetentionView.ts

@@ -2,15 +2,14 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 18:02:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-08 17:09:27
+ * @LastEditTime: 2025-04-10 10:51:35
  * @Description: 隐私挽留弹窗
  */
-import { game } from 'cc';
-import { _decorator, Component, Node } from 'cc';
+import { _decorator, game } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
-import { AndroidEvent } from '../config/AndroidEvent';
+import { AD_TYPE } from '../config/GameDefine';
 import { UIID } from '../config/GameUIConfig';
 import { CocosHandler } from '../manager/CocosHandler';
 const { ccclass, property } = _decorator;
@@ -25,7 +24,8 @@ export class RetentionView extends GameComponent {
         console.log("同意");
         //调用安卓给权限
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.ad_interstitial_start();
+            // CocosHandler.inst.ad_interstitial_start();
+            CocosHandler.inst.show_ad(AD_TYPE.Start);
             oops.gui.remove(UIID.Retention);
         }
     }

assets/script/game/eliminate/config.meta → assets/script/game/config.meta


assets/script/game/eliminate/config/GameData.ts → assets/script/game/config/GameData.ts


assets/script/game/eliminate/config/GameData.ts.meta → assets/script/game/config/GameData.ts.meta


+ 0 - 9
assets/script/game/eliminate.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.2.0",
-  "importer": "directory",
-  "imported": true,
-  "uuid": "2c121658-b6a4-478a-9cb5-23800b187fe5",
-  "files": [],
-  "subMetas": {},
-  "userData": {}
-}

+ 0 - 9
assets/script/game/eliminate/block.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.2.0",
-  "importer": "directory",
-  "imported": true,
-  "uuid": "2dead0be-7434-446c-b9f3-4589c9607425",
-  "files": [],
-  "subMetas": {},
-  "userData": {}
-}

+ 0 - 30
assets/script/game/eliminate/view/GamePassView.ts

@@ -1,30 +0,0 @@
-/*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-21 14:43:24
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-02 15:56:36
- * @Description: 游戏通关弹窗
- */
-import { _decorator, Node } from 'cc';
-import { GameComponent } from "db://oops-framework/module/common/GameComponent";
-
-const { ccclass, property } = _decorator;
-
-/** 显示对象控制 */
-@ccclass('GamePassView')
-export class GamePassView extends GameComponent {
-    //提示Node
-    @property(Node)
-    private _tipsNode: Node = null!;
-
-    //引导小手
-    @property(Node)
-    private _guildNode: Node = null!;
-
-
-    protected start() {
-
-    }
-
-
-} 

+ 5 - 4
assets/script/game/initialize/view/LoadingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 16:23:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 14:40:34
+ * @LastEditTime: 2025-04-10 15:16:01
  * @Description: loading界面
  */
 import { _decorator, Toggle } from "cc";
@@ -16,7 +16,8 @@ import { GameEvent } from "../../common/config/GameEvent";
 import { UIID } from "../../common/config/GameUIConfig";
 import { CocosHandler } from "../../common/manager/CocosHandler";
 import { smc } from "../../common/SingletonModuleComp";
-import { EliminateViewComp } from "../../eliminate/view/EliminateViewComp";
+import { AD_TYPE } from "../../common/config/GameDefine";
+import { EliminateViewComp } from "../../view/EliminateViewComp";
 const { ccclass, property } = _decorator;
 
 /** 游戏资源加载 */
@@ -61,8 +62,8 @@ export class LoadingViewComp extends CCVMParentComp {
             console.log("隐私状态>>>>>>>>>>>>>>>>", state);
             if (state.data.result) {
                 //同意之后都加载一次启屏广告
-                CocosHandler.inst.ad_interstitial_start();
-                // CocosHandler.inst.getAccountInfo();
+                // CocosHandler.inst.ad_interstitial_start();
+                CocosHandler.inst.show_ad(AD_TYPE.Start);
             } else {
                 oops.gui.open(UIID.KindTips);
             }

assets/script/game/eliminate/model.meta → assets/script/game/model.meta


+ 168 - 0
assets/script/game/model/GameModelComp.ts

@@ -0,0 +1,168 @@
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-10 14:49:42
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-10 15:25:01
+ * @Description: 
+ */
+import { ecs } from "db://oops-framework/libs/ecs/ECS";
+
+interface CurLevelInfo {
+    level: number;
+    score: number;
+}
+
+
+
+interface CurLevelConfig {
+    level: number;        //当前关卡    
+    score: number;        //当前关卡目标分数
+    skipCount: number;    //当前关卡跳过次数
+    eliminateScope: [];   //消除配置 用于展示惊喜翻倍弹窗
+    eventType: string      //消除配置
+}
+
+//费用配置
+interface CostInfo {
+    handlingCharge: number; //处理费
+    giftNum: number;         //赠送金
+}
+
+interface RecordInfo {
+    title: string,
+    amount: number,
+    payMethod: number,
+    createTime: number,
+    successTime: number,
+    status: number
+}
+
+
+
+
+/** 数据层对象 */
+@ecs.register('GameModel')
+export class GameModelComp extends ecs.Comp {
+    id: number = -1;
+
+
+    // /**手续费*/
+    _handlingCharge: number = 0;
+    /**当前分数*/
+    _curScore: number = 0;
+    /**目标分数*/
+    _targetScore: number = 0;
+    /**协议类型 1隐私 2用户*/
+    _protocolType: number = 1;
+    //当前关卡信息
+    _curLevelInfo: CurLevelInfo = null!;
+    /**当前关卡配置*/
+    _curLevelConfig: CurLevelConfig = null!;
+    /**游戏费用配置*/
+    _costInfo: CostInfo = null!;
+    //提现记录
+    _recordList: RecordInfo[] = [];
+
+    //是否是广告时间
+    _isShowAd: boolean = false;
+
+
+
+
+
+
+    /** 数据层组件移除时,重置所有数据为默认值 */
+    reset() {
+        this.id = -1;
+        this.protocolType = 1;
+        this.curLevelInfo = null!;
+        this.curLevelConfig = null!;
+        this.costInfo = null!;
+    }
+
+
+
+
+
+
+
+
+    get handlingCharge() {
+        return this._handlingCharge;
+    }
+
+    set handlingCharge(value: number) {
+        this._handlingCharge = value;
+    }
+
+    set curScore(value: number) {
+        this._curScore = value;
+    }
+
+    get curScore() {
+        return this._curScore;
+    }
+
+
+
+    get targetScore() {
+        return this._targetScore;
+    }
+
+    set targetScore(value: number) {
+        this._targetScore = value;
+    }
+
+    get protocolType() {
+        return this._protocolType;
+    }
+
+    set protocolType(value: number) {
+        this._protocolType = value;
+    }
+
+    get curLevelInfo() {
+        return this._curLevelInfo;
+    }
+
+    set curLevelInfo(value: CurLevelInfo) {
+        this._curLevelInfo = value;
+    }
+
+    get curLevelConfig() {
+        return this._curLevelConfig;
+    }
+
+    set curLevelConfig(value: CurLevelConfig) {
+        this._curLevelConfig = value;
+    }
+
+    get costInfo() {
+        return this._costInfo;
+    }
+
+    set costInfo(value: CostInfo) {
+        this._costInfo = value;
+    }
+
+
+
+    get recordList() {
+        return this._recordList;
+    }
+
+    set recordList(value: RecordInfo[]) {
+        this.recordList = value;
+    }
+
+    get isShowAd() {
+        return this._isShowAd;
+    }
+
+    set isShowAd(value: boolean) {
+        this._isShowAd = value
+    }
+
+
+
+}

+ 9 - 0
assets/script/game/model/GameModelComp.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "a6f52bc3-edb1-4209-bd07-e88c852e0e46",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

assets/script/game/eliminate/ui.meta → assets/script/game/ui.meta


assets/script/game/eliminate/ui/List.ts → assets/script/game/ui/List.ts


assets/script/game/eliminate/ui/List.ts.meta → assets/script/game/ui/List.ts.meta


assets/script/game/eliminate/ui/ListItem.ts → assets/script/game/ui/ListItem.ts


assets/script/game/eliminate/ui/ListItem.ts.meta → assets/script/game/ui/ListItem.ts.meta


assets/script/game/eliminate/view.meta → assets/script/game/view.meta


+ 6 - 6
assets/script/game/eliminate/view/CashRebateView.ts

@@ -2,16 +2,16 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:45:43
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:56:04
+ * @LastEditTime: 2025-04-10 15:07:56
  * @Description: 提现必返
  */
-import { Label } from 'cc';
-import { _decorator } from 'cc';
+import { _decorator, Label } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
-import { GameComponent } from "db://oops-framework/module/common/GameComponent";
-import { UIID } from '../../common/config/GameUIConfig';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
-import { CocosHandler } from '../../common/manager/CocosHandler';
+import { GameComponent } from "db://oops-framework/module/common/GameComponent";
+import { UIID } from '../common/config/GameUIConfig';
+import { CocosHandler } from '../common/manager/CocosHandler';
+
 
 const { ccclass, property } = _decorator;
 

assets/script/game/eliminate/view/CashRebateView.ts.meta → assets/script/game/view/CashRebateView.ts.meta


+ 18 - 1
assets/script/game/eliminate/view/CashWithdrawalView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 15:03:37
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-03-21 15:04:55
+ * @LastEditTime: 2025-04-10 11:26:51
  * @Description: 微信提现到零钱,需要有一个动画展示步骤
  */
 import { _decorator } from 'cc';
@@ -16,4 +16,21 @@ export class CashWithdrawalView extends GameComponent {
     protected start() {
 
     }
+
+    /**
+     * 
+     * 
+     * 
+     * 
+     * 
+     * 
+     * list[
+     * 
+     * 
+     * 
+     * 
+     * 
+     * 
+     * ]
+    */
 }

assets/script/game/eliminate/view/CashWithdrawalView.ts.meta → assets/script/game/view/CashWithdrawalView.ts.meta


assets/script/game/eliminate/view/DoubleRewardsView.ts → assets/script/game/view/DoubleRewardsView.ts


assets/script/game/eliminate/view/DoubleRewardsView.ts.meta → assets/script/game/view/DoubleRewardsView.ts.meta


+ 4 - 7
assets/script/game/eliminate/view/DoubleSpeedViewComp.ts

@@ -2,18 +2,15 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:17:22
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:54:18
+ * @LastEditTime: 2025-04-10 15:11:45
  * @Description: 二倍速弹窗
  */
-import { _decorator, Node } from "cc";
+import { _decorator, Label, RichText } from "cc";
 import { oops } from "db://oops-framework/core/Oops";
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
 import { CCComp } from "db://oops-framework/module/common/CCComp";
-import { UIID } from "../../common/config/GameUIConfig";
-import { Label } from "cc";
-import { RichText } from "cc";
-import { UICallbacks } from "db://oops-framework/core/gui/layer/Defines";
-import { CocosHandler } from "../../common/manager/CocosHandler";
+import { UIID } from "../common/config/GameUIConfig";
+import { CocosHandler } from "../common/manager/CocosHandler";
 
 const { ccclass, property } = _decorator;
 

assets/script/game/eliminate/view/DoubleSpeedViewComp.ts.meta → assets/script/game/view/DoubleSpeedViewComp.ts.meta


+ 210 - 196
assets/script/game/eliminate/view/EliminateViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:01:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:39:13
+ * @LastEditTime: 2025-04-10 15:29:11
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -10,11 +10,11 @@ import { oops } from "db://oops-framework/core/Oops";
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
 import { LabelChange } from "db://oops-framework/libs/gui/label/LabelChange";
 import { CCComp } from "db://oops-framework/module/common/CCComp";
-import { GameEvent } from "../../common/config/GameEvent";
-import { UIID } from "../../common/config/GameUIConfig";
-import { smc } from "../../common/SingletonModuleComp";
-import { CocosHandler } from "../../common/manager/CocosHandler";
 import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
+import { GameEvent } from "../common/config/GameEvent";
+import { UIID } from "../common/config/GameUIConfig";
+import { CocosHandler } from "../common/manager/CocosHandler";
+import { smc } from "../common/SingletonModuleComp";
 
 const { ccclass, property } = _decorator;
 
@@ -22,8 +22,8 @@ const { ccclass, property } = _decorator;
 enum GameState {
     READY,      // 准备中
     PLAYING,    // 游戏中
-    PAUSED,     // 暂停
-    GAME_OVER   // 游戏结束
+    PAUSED,     // 暂停 --看广告用
+    GAME_OVER   // 游戏结束 
 }
 
 // 游戏模式枚举
@@ -76,7 +76,6 @@ interface EditingData {
 interface BrickData {
     index: number,
     brickKey: string | null,
-    rotateTag: boolean,
     rotateFlag: boolean,
     gridConfig: Grids[],
     deg: number,
@@ -105,7 +104,7 @@ export class EliminateViewComp extends CCComp {
     private tweenRedNode: Node = null!;
 
     @property({ type: Prefab, displayName: "金币预制体" })
-    private coinPrefab: Prefab = null!;
+    private coinPrefab: Prefab = null!
     @property({ type: Prefab, displayName: "红包预制体" })
     private redPacketPrefab: Prefab = null!;
     @property({ type: Label, displayName: "本局分数" })
@@ -115,11 +114,6 @@ export class EliminateViewComp extends CCComp {
     @property({ type: Label, displayName: "第几块金砖" })
     private lab_brick: Label = null!;
 
-    @property({ type: Label, displayName: "第几关" })
-    private lab_levle: Label = null!;
-
-
-
     @property({ type: Prefab, displayName: "item预制体列表" })
     private itemPrefabs: Prefab[] = [];
     @property({ type: Node, displayName: "网格Node" })
@@ -138,12 +132,12 @@ export class EliminateViewComp extends CCComp {
     @property({ type: Label, displayName: "每次放置添加的分数" })
     private lab_addScore: Label = null!;
 
+
     @property({ type: Button, displayName: "自动按钮" })
     private autoBtn: Button = null!;
     @property({ type: Button, displayName: "二倍速按钮" })
     private addSpeedBtn: Button = null!;
 
-
     //游戏配置行列
     private rows: number = 8;       // 行数
     private cols: number = 8;       // 列数
@@ -154,7 +148,7 @@ export class EliminateViewComp extends CCComp {
     private score: number = 0;      //本局分数
     private money: number = 0;      //左边金钱
     private cash: number = 0;       //右边红包钱数
-    private goldNum: number = 0;     //尽快数量
+    private goldNum: number = 0;     //金块数量
 
     private targetScore: number = 0; //目标分数
 
@@ -263,10 +257,10 @@ export class EliminateViewComp extends CCComp {
 
     //设置数据
     setData() {
-        this.score = smc.account.AccountModel.curScore || 0;
+        this.score = smc.game.GameModel.curScore || 0;
         this.money = smc.account.AccountModel.gameCoin;
         this.cash = smc.account.AccountModel.cashCoin;
-        this.targetScore = smc.account.AccountModel.targetScore || 0;
+        this.targetScore = smc.game.GameModel.targetScore || 0;
         this.lab_score.string = this.score.toString();
         this.amountLb.string = this.money.toString();
         this.awardLb.string = this.cash.toString();
@@ -395,7 +389,6 @@ export class EliminateViewComp extends CCComp {
             console.warn('无效的网格数据');
             return;
         }
-
         // 清理现有子节点
         this.clearGridChildren(gridData.gridNode);
 
@@ -483,7 +476,6 @@ export class EliminateViewComp extends CCComp {
             deg: 0,
             brickNode: null,
             brickInitPos: new Vec3(),
-            rotateTag: false,
             type: randomIndex,
         }
         this.bricksList.push(brickData)
@@ -1525,226 +1517,248 @@ export class EliminateViewComp extends CCComp {
     }
 
 
-    //自动按钮
+    //自动放置
     private btn_auto() {
-        //自动放置
         this.autoState = !this.autoState;
-        this._isDoubleSpeed = !this._isDoubleSpeed;
         this.initButtonState(this.autoState);
+        this.gameState = GameState.PLAYING
         if (this.autoState) {
-            this.gameState = GameState.PLAYING;
-            this.executeAutoPlace()
+            this.startAutoMode();
+        } else {
+            this.stopAutoMode();
         }
     }
 
+    private autoModeScheduleKey: number = 0;
 
-    executeAutoPlace() {
-        if (!this.autoState || this.gameState !== GameState.PLAYING || this.editingFlag) {
-            return
-        }
-        console.log("开始自动放置")
-        const bestPlacement = this.findBestPlacement()
-        if (!bestPlacement) {
-            // 所有方块都无法放置,游戏结束
-            this.autoState = false
-            this.gameOver()
-            return
-        }
+    private startAutoMode() {
+        this.stopAutoMode(); // 确保先停止之前的自动模式
+        const interval = this._isDoubleSpeed ? this.autoModeInterval / this._doubleNum : this.autoModeInterval;
+        this.autoModeScheduleKey = this.schedule(this.executeAutoPlacement, interval);
+    }
 
-        // 执行放置
-        this.placeBrickAtPosition(bestPlacement)
+    private stopAutoMode() {
+        this.unschedule(this.executeAutoPlacement);
     }
 
-    findBestPlacement() {
-        const placements = []
+    // 调整自动放置速度
+    public setAutoPlacementSpeed(interval: number) {
+        this.autoModeInterval = interval;
+        if (this.autoState) {
+            this.startAutoMode(); // 重新启动以更新间隔
+        }
+    }
 
-        // 对每个方块计算所有可能的放置位置和分数
-        for (let brickIndex = 0; brickIndex < this.bricksList.length; brickIndex++) {
-            const brickData = this.bricksList[brickIndex]
+    // 执行自动放置
+    private executeAutoPlacement() {
+        if (this.editingFlag || this.gameState !== GameState.PLAYING) return;
 
-            // 检查不同旋转状态
-            let gridConfigs = [brickData.gridConfig]
-            let degrees = [brickData.deg]
+        // 查找最佳放置方案
+        const bestPlacement = this.findBestPlacement();
+        if (!bestPlacement) {
+            this.gameOver();
+            return;
+        }
 
-            // 如果可旋转,计算所有旋转状态
-            if (brickData.rotateFlag) {
-                for (let i = 1; i <= 3; i++) {
-                    const next = this.nextGridRotate(
-                        i === 1 ? brickData.gridConfig : gridConfigs[i - 1],
-                        i === 1 ? brickData.deg : degrees[i - 1]
-                    )
-                    gridConfigs.push(next.gridConfig)
-                    degrees.push(next.deg)
-                }
-            }
+        this.autoPlaceBrick(bestPlacement);
+    }
 
-            // 遍历所有网格位置
-            for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
-                for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
-                    // 对每个旋转状态检查
-                    for (let rotateIndex = 0; rotateIndex < gridConfigs.length; rotateIndex++) {
-                        const currentGridConfig = gridConfigs[rotateIndex]
-                        const currentDeg = degrees[rotateIndex]
 
+    // 查找最佳放置方案
+    private findBestPlacement() {
+        // 最佳放置方案
+        let bestPlacement: {
+            brickIndex: number,
+            row: number,
+            column: number,
+            rotateCount: number,
+            score: number
+        } | null = null;
+
+        // 遍历所有方块
+        for (let brickI = 0; brickI < this.bricksList.length; brickI++) {
+            const brickData = this.bricksList[brickI];
+
+            // 尝试所有可能的旋转状态
+            let currentGridConfig = [...brickData.gridConfig];
+            let currentDeg = brickData.deg;
+
+            for (let rotateCount = 0; rotateCount < 4; rotateCount++) {
+                // 遍历所有网格位置
+                for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
+                    for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
                         // 检查是否可以放置
                         if (this.moveIf(rowIndex, columnIndex, currentGridConfig)) {
-                            // 复制网格并模拟放置
-                            const gridList = this.copyGridList()
-                            currentGridConfig.forEach((gridConfigData) => {
-                                const r = gridConfigData.row + rowIndex
-                                const c = gridConfigData.column + columnIndex
-                                gridList[r][c].status = CellState.FILLED
-                                // gridList[r][c].gridColorKey = brickData.gridColorKey
-                                gridList[r][c].type = brickData.type;
-                            })
-
-                            // 检查是否可以消除,计算分数
-                            const elimination = this.gridEliminateCheck(gridList)
-                            let score = 0
-
-                            if (elimination.gridEliminateList.length > 0) {
-                                // 计算消除得分
-                                for (let i = 1; i <= elimination.eliminateRowNum; i++) {
-                                    score += this.cols * i
+                            // 复制网格状态并模拟放置
+                            const gridListCopy = this.copyGridList();
+                            currentGridConfig.forEach((configData) => {
+                                gridListCopy[configData.row + rowIndex][configData.column + columnIndex].status = CellState.FILLED;
+                                gridListCopy[configData.row + rowIndex][configData.column + columnIndex].type = brickData.type;
+                            });
+
+                            // 计算放置后的分数
+                            const eliminateResult = this.gridEliminateCheck(gridListCopy);
+                            const eliminatedCount = eliminateResult.gridEliminateList.length;
+
+                            let score = 0;
+                            // 有消除,计算消除分数
+                            if (eliminatedCount > 0) {
+                                for (let i = 1; i <= eliminateResult.eliminateRowNum; i++) {
+                                    score += this.cols * i;
                                 }
-                                for (let i = 1; i <= elimination.eliminateColumnNum; i++) {
-                                    score += this.rows * i
+                                for (let i = 1; i <= eliminateResult.eliminateColumnNum; i++) {
+                                    score += this.rows * i;
                                 }
                             }
 
-                            // 记录此放置选项
-                            placements.push({
-                                brickIndex,
-                                brickData,
-                                rowIndex,
-                                columnIndex,
-                                gridConfig: currentGridConfig,
-                                deg: currentDeg,
-                                score,
-                                canEliminate: elimination.gridEliminateList.length > 0
-                            })
+                            // 如果没有消除,至少给予放置的块数作为基础分
+                            if (score === 0) {
+                                score = currentGridConfig.length * 0.1; // 给一个很小的分数,优先选择能放置的方案
+                            }
+
+                            // 更新最佳方案
+                            if (!bestPlacement || score > bestPlacement.score) {
+                                bestPlacement = {
+                                    brickIndex: brickI,
+                                    row: rowIndex,
+                                    column: columnIndex,
+                                    rotateCount: rotateCount,
+                                    score: score
+                                };
+                            }
                         }
                     }
                 }
-            }
-        }
 
-        // 按优先级排序:最高分 > 有分数 > 没有分数但可放置
-        placements.sort((a, b) => {
-            // 首先按分数排序
-            if (a.score !== b.score) {
-                return b.score - a.score
-            }
-            // 其次按是否可消除排序
-            if (a.canEliminate !== b.canEliminate) {
-                return a.canEliminate ? -1 : 1
+                // 旋转方块到下一个状态
+                if (rotateCount < 3 && brickData.rotateFlag) {
+                    const next = this.nextGridRotate(currentGridConfig, currentDeg);
+                    currentGridConfig = next.gridConfig;
+                    currentDeg = next.deg;
+                }
             }
-            // 最后按照方块优先级排序(底部的方块优先)
-            return a.brickIndex - b.brickIndex
-        })
+        }
 
-        return placements.length > 0 ? placements[0] : null
+        return bestPlacement;
     }
 
-    // ... existing code ...
+    // 自动放置方块
+    private autoPlaceBrick(placement: { brickIndex: number, row: number, column: number, rotateCount: number, score: number }) {
+        const brickData = this.bricksList[placement.brickIndex];
+        if (!brickData || !brickData.brickNode) return;
+        console.log("brickData>>>>>>", brickData);
+        // 获取方块节点
+        const brickNode = brickData.brickNode;
+
+        // 先将方块移到移动层以便显示动画
+        const originalParent = brickNode.parent;
+        const startPos = brickNode.getWorldPosition().clone();
+        brickNode.setParent(this.moveNode);
+        brickNode.setWorldPosition(startPos);
+
+        // 放大方块
+        tween(brickNode)
+            .to(0.2, { scale: new Vec3(1, 1, 1) })
+            .start();
 
-    placeBrickAtPosition(placement) {
-        // 获取方块数据
-        const brickData = placement.brickData
-        const index = this.bricksList.findIndex(data => data === brickData)
-        if (index === -1) {
-            console.error("无法找到要放置的方块:", brickData)
-            return
-        }
+        // 从方块列表中移除该方块
+        this.bricksList.splice(placement.brickIndex, 1);
 
-        // 从待选区移除方块
-        this.editingData.brickData = this.bricksList.splice(index, 1)[0]
+        // 准备旋转和定位数据
+        let currentGridConfig = [...brickData.gridConfig];
+        let currentDeg = brickData.deg;
 
-        // 如果需要旋转,执行旋转
-        const num = this._isDoubleSpeed ? this._doubleNum : 1;
-        if (brickData.deg !== placement.deg) {
-            // 更新方块配置和角度
-            brickData.gridConfig = placement.gridConfig
-            brickData.deg = placement.deg
-            // 添加旋转动画
-            tween(brickData.brickNode).to(0.2 / num, { angle: placement.deg }).start()
-        }
+        // 计算目标网格的中心位置
+        const targetGridList: GridData[] = [];
+        let targetPos = new Vec3(0, 0, 0);
 
-        // 准备网格列表
-        this.editingData.gridList = []
-        placement.gridConfig.forEach((gridConfigData: GridConfigData) => {
-            const r = gridConfigData.row + placement.rowIndex
-            const c = gridConfigData.column + placement.columnIndex
-            this.editingData.gridList.push(this.gridList[r][c])
-        })
-
-        // 计算目标位置 - 使用中间位置作为基准
-        let centerPos = new Vec3(0, 0, 0);
-        let validGridCount = 0;
+        // 确定需要放置的格子
+        for (let i = 0; i < placement.rotateCount; i++) {
+            if (brickData.rotateFlag) {
+                const next = this.nextGridRotate(currentGridConfig, currentDeg);
+                currentGridConfig = next.gridConfig;
+                currentDeg = next.deg;
+            }
+        }
 
-        // 计算所有网格的平均位置
-        this.editingData.gridList.forEach(grid => {
-            if (grid.gridNode) {
-                const worldPos = grid.gridNode.getWorldPosition();
-                centerPos.add(worldPos);
-                validGridCount++;
+        // 计算目标位置--这里出问题了
+        currentGridConfig.forEach(configData => {
+            const gridRow = configData.row + placement.row;
+            const gridCol = configData.column + placement.column;
+            if (gridRow >= 0 && gridRow < this.rows && gridCol >= 0 && gridCol < this.cols) {
+                const grid = this.gridList[gridRow][gridCol];
+                if (grid.gridNode) {
+                    targetGridList.push(grid);
+                    targetPos.add(grid.gridNode.getWorldPosition());
+                }
             }
         });
 
-        // 计算平均位置
-        if (validGridCount > 0) {
-            centerPos.x /= validGridCount;
-            centerPos.y /= validGridCount;
-            centerPos.z /= validGridCount;
-        } else {
-            // 如果没有有效网格,使用第一个网格的位置作为后备
-            const targetGridData = this.editingData.gridList[0];
-            if (targetGridData && targetGridData.gridNode) {
-                centerPos = targetGridData.gridNode.getWorldPosition();
-            }
+        console.log("this.gridList", this.gridList);
+        if (targetGridList.length > 0) {
+            targetPos.x /= targetGridList.length;
+            targetPos.y /= targetGridList.length;
+        }
+        // 创建动画序列
+        const tweenSequence = tween(brickNode);
+
+        // 1. 先执行旋转动画(如果需要)
+        if (placement.rotateCount > 0 && brickData.rotateFlag) {
+            tweenSequence.to(0.3, { angle: currentDeg });
         }
 
-        // 添加到移动节点里进行移动
-        const originPos = brickData.brickNode.getWorldPosition()
-        brickData.brickNode.setParent(this.moveNode)
-        brickData.brickNode.setWorldPosition(originPos)
+        // 2. 再执行移动动画
+        tweenSequence.to(0.5, { worldPosition: targetPos });
+
+        // 3. 动画完成后更新网格和执行后续操作
+        tweenSequence.call(() => {
+            // 放置方块到网格
+            targetGridList.forEach(grid => {
+                grid.status = CellState.FILLED;
+                grid.type = brickData.type;
+                //这是对的
+                console.log(">>>>>>>>>>>>>>>>>", grid);
+                this.generateGrid(grid);
+            });
 
+            // 显示得分动画
+            this.showScoreAnimation(targetPos, targetGridList.length);
 
-        // 使用动画移动到目标位置--这里的最终放置有问题
-        tween(brickData.brickNode)
-            .to(2 / num, { worldPosition: centerPos })
-            .call(() => {
-                // 动画完成后修改格子状态
-                this.editingData.gridList.forEach((gridData) => {
-                    gridData.status = CellState.FILLED
-                    gridData.type = this.editingData.brickData.type
-                    this.generateGrid(gridData)
-                })
+            // 标记需要重置消除计数器
+            this.shouldResetEliminateCount = true;
+
+            // 销毁方块节点
+            brickNode.destroy();
+
+            // 添加新方块到待选区
+            this.addBrick(brickData.index);
+
+            // 检查消除
+            this.scheduleOnce(() => {
+                this.gridEliminate().then((hasElimination) => {
+                    // 如果没有消除,确保下次消除会重置计数
+                    if (!hasElimination) {
+                        this.shouldResetEliminateCount = true;
+                    }
 
-                // 销毁方块
-                this.editingData.brickData.brickNode.destroy()
-
-                // 添加新方块
-                this.addBrick(this.editingData.brickData.index)
-
-                // 检查消除和游戏状态
-                this.gridEliminate().then(() => {
-                    this.prompt(false).then((value: unknown) => {
-                        const promptFlag = value as boolean;
-                        if (!promptFlag) {
-                            this.autoState = false
-                            this.gameOver()
-                        } else if (this.autoState) {
-                            // 继续自动放置
-                            this.scheduleOnce(() => {
-                                this.executeAutoPlace()
-                            }, 0.3)
+                    // 检查游戏是否结束
+                    this.prompt(false).then(canContinue => {
+                        if (!canContinue) {
+                            this.gameOver();
+                            this.stopAutoMode();
                         }
-                        this.editingFlag = false
-                    })
-                })
-            })
-            .start()
+                    });
+                });
+            }, 0.1);
+        });
+
+        // 应用二倍速度
+        if (this._isDoubleSpeed) {
+            tweenSequence.speedScale = this._doubleNum;
+        }
+
+        // 启动动画
+        tweenSequence.start();
     }
 
 

assets/script/game/eliminate/view/EliminateViewComp.ts.meta → assets/script/game/view/EliminateViewComp.ts.meta


+ 3 - 3
assets/script/game/eliminate/view/GameOverView.ts

@@ -2,14 +2,14 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-27 18:19:53
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-03-31 18:59:06
+ * @LastEditTime: 2025-04-10 15:08:55
  * @Description: 游戏结束界面
  */
 import { _decorator } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
 import { GameComponent } from "db://oops-framework/module/common/GameComponent";
-import { GameEvent } from '../../common/config/GameEvent';
-import { UIID } from '../../common/config/GameUIConfig';
+import { UIID } from '../common/config/GameUIConfig';
+import { GameEvent } from '../common/config/GameEvent';
 
 const { ccclass, property } = _decorator;
 

assets/script/game/eliminate/view/GameOverView.ts.meta → assets/script/game/view/GameOverView.ts.meta


+ 99 - 0
assets/script/game/view/GamePassView.ts

@@ -0,0 +1,99 @@
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-03-21 14:43:24
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-10 14:37:08
+ * @Description: 游戏通关弹窗
+ */
+import { Label, Node } from 'cc';
+import { _decorator } from 'cc';
+import { oops } from 'db://oops-framework/core/Oops';
+import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
+import { GameComponent } from "db://oops-framework/module/common/GameComponent";
+import { AD_TYPE } from '../common/config/GameDefine';
+import { UIID } from '../common/config/GameUIConfig';
+import { CocosHandler } from '../common/manager/CocosHandler';
+
+
+const { ccclass, property } = _decorator;
+
+/** 显示对象控制 */
+@ccclass('GamePassView')
+export class GamePassView extends GameComponent {
+    //提示Node
+    @property(Label)
+    private lab_tips: Label = null!;
+    @property(Node)
+    private receiveNode: Node = null!; //十倍领取
+
+
+
+    //引导小手
+    @property(Node)
+    private guildNode: Node = null!;
+
+
+    @property([Label])
+    private lab_list: Label[] = [];
+
+    private time: number = 3;  //倒数时间
+
+    private isAuto: boolean = true;  //服务器传是否展示按钮
+    callback: Function = null!;
+
+    protected start() {
+        this.isAuto = true;
+    }
+
+
+
+    private setData() {
+
+        this.receiveNode.active = this.isAuto;
+        if (this.isAuto) {
+            this.setAutoReceive();
+        }
+
+    }
+
+
+    //开心收下正常领取
+    private btn_none() {
+        //是否展示广告
+
+
+    }
+
+    //十倍领取
+    private btn_more() {
+        this.isAuto = false;
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            CocosHandler.inst.show_ad(AD_TYPE.Pass_Receive);
+        } else {
+            oops.gui.remove(UIID.GamePass);
+        }
+    }
+
+
+    //设置自动领取
+    setAutoReceive() {
+
+        let time = this.time;
+        this.callback = function () {
+            if (time <= 0 && this.isAuto) {
+                this.unschedule(this.callback)
+                //
+                CocosHandler.inst.show_ad(AD_TYPE.Pass_Receive);
+
+            }
+            this.lab_tips.string = `${time}秒后自动领取`;
+            time--;
+        }
+        this.schedule(this.callback, 1, this.time);
+
+    }
+
+
+
+
+} 

assets/script/game/eliminate/view/GamePassView.ts.meta → assets/script/game/view/GamePassView.ts.meta


assets/script/game/eliminate/view/GuildTipsView.ts → assets/script/game/view/GuildTipsView.ts


assets/script/game/eliminate/view/GuildTipsView.ts.meta → assets/script/game/view/GuildTipsView.ts.meta


+ 2 - 5
assets/script/game/eliminate/view/RedPackeItemView.ts

@@ -2,14 +2,11 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 18:39:37
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 17:42:10
+ * @LastEditTime: 2025-04-10 15:09:37
  * @Description: 红包列表item
  */
-import { _decorator, Node } from 'cc';
+import { _decorator, Label, Node, ProgressBar, Sprite } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
-import { Label } from 'cc';
-import { ProgressBar } from 'cc';
-import { Sprite } from 'cc';
 import VMParent from 'db://oops-framework/libs/model-view/VMParent';
 
 const { ccclass, property } = _decorator;

assets/script/game/eliminate/view/RedPackeItemView.ts.meta → assets/script/game/view/RedPackeItemView.ts.meta


+ 7 - 10
assets/script/game/eliminate/view/RedPackeWithdrawalViewComp.ts

@@ -2,21 +2,18 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:53:50
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 17:38:37
+ * @LastEditTime: 2025-04-10 15:11:12
  * @Description: 红包提现
  */
-import { _decorator, Node } from "cc";
+import { _decorator, Label, Node } from "cc";
 import { oops } from "db://oops-framework/core/Oops";
-import { ecs } from "db://oops-framework/libs/ecs/ECS";
-import { CCComp } from "db://oops-framework/module/common/CCComp";
-import { UIID } from "../../common/config/GameUIConfig";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
+import { GameComponent } from "db://oops-framework/module/common/GameComponent";
+import { GameEvent } from "../common/config/GameEvent";
+import { UIID } from "../common/config/GameUIConfig";
+import { CocosHandler } from "../common/manager/CocosHandler";
 import List from "../ui/List";
 import { RedPackeItemView } from "./RedPackeItemView";
-import { GameComponent } from "db://oops-framework/module/common/GameComponent";
-import { Label } from "cc";
-import { GameEvent } from "../../common/config/GameEvent";
-import { CocosHandler } from "../../common/manager/CocosHandler";
-import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 
 const { ccclass, property } = _decorator;
 

assets/script/game/eliminate/view/RedPackeWithdrawalViewComp.ts.meta → assets/script/game/view/RedPackeWithdrawalViewComp.ts.meta


assets/script/game/eliminate/view/ReserveView.ts → assets/script/game/view/ReserveView.ts


assets/script/game/eliminate/view/ReserveView.ts.meta → assets/script/game/view/ReserveView.ts.meta


assets/script/game/eliminate/view/VerifyView.ts → assets/script/game/view/VerifyView.ts


assets/script/game/eliminate/view/VerifyView.ts.meta → assets/script/game/view/VerifyView.ts.meta


+ 6 - 9
assets/script/game/eliminate/view/WechatWithdrawalViewComp.ts

@@ -2,20 +2,17 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:00:12
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:26:41
+ * @LastEditTime: 2025-04-10 15:09:55
  * @Description: 微信提现页面
  */
-import { _decorator, Node } from "cc";
+import { _decorator, Node, RichText, tween, Vec3 } from "cc";
 import { oops } from "db://oops-framework/core/Oops";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
 import { CCComp } from "db://oops-framework/module/common/CCComp";
-import { UIID } from "../../common/config/GameUIConfig";
-import { RichText } from "cc";
-import { tween } from "cc";
-import { Vec3 } from "cc";
-import { GameEvent } from "../../common/config/GameEvent";
-import { CocosHandler } from "../../common/manager/CocosHandler";
-import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
+import { GameEvent } from "../common/config/GameEvent";
+import { UIID } from "../common/config/GameUIConfig";
+import { CocosHandler } from "../common/manager/CocosHandler";
 
 const { ccclass, property } = _decorator;
 

assets/script/game/eliminate/view/WechatWithdrawalViewComp.ts.meta → assets/script/game/view/WechatWithdrawalViewComp.ts.meta


+ 8 - 9
assets/script/game/eliminate/view/WithdrawalRecordViewComp.ts

@@ -2,18 +2,17 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 10:17:49
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 18:48:06
+ * @LastEditTime: 2025-04-10 15:10:48
  * @Description: 提现记录
  */
-import { _decorator, Node } from "cc";
+import { _decorator, Label, Node } from "cc";
+import { oops } from "db://oops-framework/core/Oops";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
 import { CCComp } from "db://oops-framework/module/common/CCComp";
+import { UIID } from "../common/config/GameUIConfig";
+import { smc } from "../common/SingletonModuleComp";
 import List from "../ui/List";
-import { Label } from "cc";
-import { oops } from "db://oops-framework/core/Oops";
-import { UIID } from "../../common/config/GameUIConfig";
-import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
-import { smc } from "../../common/SingletonModuleComp";
 
 const { ccclass, property } = _decorator;
 
@@ -36,11 +35,11 @@ export class WithdrawalRecordViewComp extends CCComp {
         this.setButton();
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            const count = smc.account.AccountModel.recordList.length;
+            const count = smc.game.GameModel.recordList.length;
             this.noRecord.active = count <= 0;
             this.content.active = count > 0;
             if (count > 0) {
-                this.data = smc.account.AccountModel.recordList;
+                this.data = smc.game.GameModel.recordList;
                 this.recordList.numItems = this.data.length;
             }
         } else {

assets/script/game/eliminate/view/WithdrawalRecordViewComp.ts.meta → assets/script/game/view/WithdrawalRecordViewComp.ts.meta