diff --git a/assets/resources/game/heros/mo1.prefab b/assets/resources/game/heros/mo1.prefab index 36853081..26f709b6 100644 --- a/assets/resources/game/heros/mo1.prefab +++ b/assets/resources/game/heros/mo1.prefab @@ -358,7 +358,10 @@ "_fillRange": 0, "_isTrimmedMode": true, "_useGrayscale": false, - "_atlas": null, + "_atlas": { + "__uuid__": "9e1b429f-da49-4fbb-a36b-373f9d64b4b4", + "__expectedType__": "cc.SpriteAtlas" + }, "_id": "" }, { diff --git a/assets/resources/gui/Hinfo.prefab b/assets/resources/gui/Hinfo.prefab index 283d2389..019cd5f0 100644 --- a/assets/resources/gui/Hinfo.prefab +++ b/assets/resources/gui/Hinfo.prefab @@ -23154,7 +23154,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 32, + "x": 25.6, "y": 0, "z": 0 }, @@ -23167,8 +23167,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, + "x": 0.3, + "y": 0.3, "z": 1 }, "_mobility": 0, @@ -23293,7 +23293,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 215.048828125, + "x": 153.89921875, "y": 0, "z": 0 }, @@ -23334,7 +23334,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 149.048828125, + "width": 100.69921875, "height": 54.4 }, "_anchorPoint": { @@ -23373,8 +23373,8 @@ "_string": "{{0:kmbt}}", "_horizontalAlign": 2, "_verticalAlign": 1, - "_actualFontSize": 30, - "_fontSize": 30, + "_actualFontSize": 20, + "_fontSize": 20, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -23476,7 +23476,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 217.048828125, + "x": 155.89921875, "y": 0, "z": 0 }, @@ -23635,7 +23635,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 231.3837890625, + "x": 170.2341796875, "y": 0, "z": 0 }, @@ -23676,7 +23676,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 54.0537109375, + "width": 37.369140625, "height": 54.4 }, "_anchorPoint": { @@ -23715,8 +23715,8 @@ "_string": "999", "_horizontalAlign": 0, "_verticalAlign": 1, - "_actualFontSize": 30, - "_fontSize": 30, + "_actualFontSize": 20, + "_fontSize": 20, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -23936,7 +23936,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 32, + "x": 25.6, "y": 0, "z": 0 }, @@ -23949,8 +23949,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, + "x": 0.3, + "y": 0.3, "z": 1 }, "_mobility": 0, @@ -24075,7 +24075,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 215.048828125, + "x": 153.89921875, "y": 0, "z": 0 }, @@ -24116,7 +24116,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 149.048828125, + "width": 100.69921875, "height": 54.4 }, "_anchorPoint": { @@ -24155,8 +24155,8 @@ "_string": "{{0:kmbt}}", "_horizontalAlign": 2, "_verticalAlign": 1, - "_actualFontSize": 30, - "_fontSize": 30, + "_actualFontSize": 20, + "_fontSize": 20, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -24258,7 +24258,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 217.048828125, + "x": 155.89921875, "y": 0, "z": 0 }, @@ -24417,7 +24417,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 231.3837890625, + "x": 170.2341796875, "y": 0, "z": 0 }, @@ -24458,7 +24458,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 54.0537109375, + "width": 37.369140625, "height": 54.4 }, "_anchorPoint": { @@ -24497,8 +24497,8 @@ "_string": "999", "_horizontalAlign": 0, "_verticalAlign": 1, - "_actualFontSize": 30, - "_fontSize": 30, + "_actualFontSize": 20, + "_fontSize": 20, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index 08e25a32..785ae052 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -2669,26 +2669,29 @@ "__id__": 132 }, { - "__id__": 140 + "__id__": 138 }, { - "__id__": 166 + "__id__": 164 }, { - "__id__": 188 + "__id__": 186 }, { - "__id__": 210 + "__id__": 208 }, { - "__id__": 232 + "__id__": 230 }, { - "__id__": 254 + "__id__": 252 } ], "_active": true, "_components": [ + { + "__id__": 262 + }, { "__id__": 264 }, @@ -2866,7 +2869,7 @@ }, { "__type__": "cc.Node", - "_name": "Label", + "_name": "mission", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -2880,13 +2883,10 @@ }, { "__id__": 135 - }, - { - "__id__": 137 } ], "_prefab": { - "__id__": 139 + "__id__": 137 }, "_lpos": { "__type__": "cc.Vec3", @@ -2931,7 +2931,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 186.84423828125, + "width": 132.36181640625, "height": 60.7 }, "_anchorPoint": { @@ -2967,7 +2967,7 @@ "b": 255, "a": 255 }, - "_string": "第 {{0}} 关", + "_string": "第 1 关", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 35, @@ -3013,30 +3013,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "8fhLBwmo1E3pqG7vieCW4j" }, - { - "__type__": "545c05XsG9GDJispEGWKvYv", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 132 - }, - "_enabled": true, - "__prefab": { - "__id__": 138 - }, - "templateMode": true, - "watchPath": "data.data.mission", - "labelType": "cc.Label", - "watchPathArr": [ - "data.data.mission" - ], - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "3eEh5D979B9KPO9neWkCmn" - }, { "__type__": "cc.PrefabInfo", "root": { @@ -3060,14 +3036,17 @@ }, "_children": [ { - "__id__": 141 + "__id__": 139 }, { - "__id__": 149 + "__id__": 147 } ], "_active": true, "_components": [ + { + "__id__": 155 + }, { "__id__": 157 }, @@ -3076,13 +3055,10 @@ }, { "__id__": 161 - }, - { - "__id__": 163 } ], "_prefab": { - "__id__": 165 + "__id__": 163 }, "_lpos": { "__type__": "cc.Vec3", @@ -3119,23 +3095,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 140 + "__id__": 138 }, "_children": [], "_active": true, "_components": [ + { + "__id__": 140 + }, { "__id__": 142 }, { "__id__": 144 - }, - { - "__id__": 146 } ], "_prefab": { - "__id__": 148 + "__id__": 146 }, "_lpos": { "__type__": "cc.Vec3", @@ -3172,11 +3148,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 141 + "__id__": 139 }, "_enabled": true, "__prefab": { - "__id__": 143 + "__id__": 141 }, "_contentSize": { "__type__": "cc.Size", @@ -3200,11 +3176,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 141 + "__id__": 139 }, "_enabled": true, "__prefab": { - "__id__": 145 + "__id__": 143 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3245,11 +3221,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 141 + "__id__": 139 }, "_enabled": true, "__prefab": { - "__id__": 147 + "__id__": 145 }, "_alignFlags": 5, "_target": null, @@ -3294,23 +3270,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 140 + "__id__": 138 }, "_children": [], "_active": true, "_components": [ + { + "__id__": 148 + }, { "__id__": 150 }, { "__id__": 152 - }, - { - "__id__": 154 } ], "_prefab": { - "__id__": 156 + "__id__": 154 }, "_lpos": { "__type__": "cc.Vec3", @@ -3347,11 +3323,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 149 + "__id__": 147 }, "_enabled": true, "__prefab": { - "__id__": 151 + "__id__": 149 }, "_contentSize": { "__type__": "cc.Size", @@ -3375,11 +3351,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 149 + "__id__": 147 }, "_enabled": true, "__prefab": { - "__id__": 153 + "__id__": 151 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3420,11 +3396,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 149 + "__id__": 147 }, "_enabled": true, "__prefab": { - "__id__": 155 + "__id__": 153 }, "_alignFlags": 45, "_target": null, @@ -3469,11 +3445,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 140 + "__id__": 138 }, "_enabled": true, "__prefab": { - "__id__": 158 + "__id__": 156 }, "_contentSize": { "__type__": "cc.Size", @@ -3497,11 +3473,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 140 + "__id__": 138 }, "_enabled": true, "__prefab": { - "__id__": 160 + "__id__": 158 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3542,14 +3518,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 140 + "__id__": 138 }, "_enabled": true, "__prefab": { - "__id__": 162 + "__id__": 160 }, "_barSprite": { - "__id__": 144 + "__id__": 142 }, "_mode": 0, "_totalLength": 300, @@ -3567,11 +3543,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 140 + "__id__": 138 }, "_enabled": true, "__prefab": { - "__id__": 164 + "__id__": 162 }, "controller": false, "watchPath": "", @@ -3612,23 +3588,23 @@ }, "_children": [ { - "__id__": 167 + "__id__": 165 }, { - "__id__": 173 + "__id__": 171 }, { - "__id__": 179 + "__id__": 177 } ], "_active": true, "_components": [ { - "__id__": 185 + "__id__": 183 } ], "_prefab": { - "__id__": 187 + "__id__": 185 }, "_lpos": { "__type__": "cc.Vec3", @@ -3665,20 +3641,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 166 + "__id__": 164 }, "_children": [], "_active": true, "_components": [ { - "__id__": 168 + "__id__": 166 }, { - "__id__": 170 + "__id__": 168 } ], "_prefab": { - "__id__": 172 + "__id__": 170 }, "_lpos": { "__type__": "cc.Vec3", @@ -3715,11 +3691,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 167 + "__id__": 165 }, "_enabled": true, "__prefab": { - "__id__": 169 + "__id__": 167 }, "_contentSize": { "__type__": "cc.Size", @@ -3743,11 +3719,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 167 + "__id__": 165 }, "_enabled": true, "__prefab": { - "__id__": 171 + "__id__": 169 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3801,20 +3777,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 166 + "__id__": 164 }, "_children": [], "_active": true, "_components": [ { - "__id__": 174 + "__id__": 172 }, { - "__id__": 176 + "__id__": 174 } ], "_prefab": { - "__id__": 178 + "__id__": 176 }, "_lpos": { "__type__": "cc.Vec3", @@ -3851,11 +3827,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 173 + "__id__": 171 }, "_enabled": true, "__prefab": { - "__id__": 175 + "__id__": 173 }, "_contentSize": { "__type__": "cc.Size", @@ -3879,11 +3855,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 173 + "__id__": 171 }, "_enabled": true, "__prefab": { - "__id__": 177 + "__id__": 175 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3937,20 +3913,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 166 + "__id__": 164 }, "_children": [], "_active": true, "_components": [ { - "__id__": 180 + "__id__": 178 }, { - "__id__": 182 + "__id__": 180 } ], "_prefab": { - "__id__": 184 + "__id__": 182 }, "_lpos": { "__type__": "cc.Vec3", @@ -3987,11 +3963,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 179 + "__id__": 177 }, "_enabled": true, "__prefab": { - "__id__": 181 + "__id__": 179 }, "_contentSize": { "__type__": "cc.Size", @@ -4015,11 +3991,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 179 + "__id__": 177 }, "_enabled": true, "__prefab": { - "__id__": 183 + "__id__": 181 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4096,11 +4072,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 166 + "__id__": 164 }, "_enabled": true, "__prefab": { - "__id__": 186 + "__id__": 184 }, "_contentSize": { "__type__": "cc.Size", @@ -4141,23 +4117,23 @@ }, "_children": [ { - "__id__": 189 + "__id__": 187 }, { - "__id__": 195 + "__id__": 193 }, { - "__id__": 201 + "__id__": 199 } ], "_active": true, "_components": [ { - "__id__": 207 + "__id__": 205 } ], "_prefab": { - "__id__": 209 + "__id__": 207 }, "_lpos": { "__type__": "cc.Vec3", @@ -4194,20 +4170,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 188 + "__id__": 186 }, "_children": [], "_active": true, "_components": [ { - "__id__": 190 + "__id__": 188 }, { - "__id__": 192 + "__id__": 190 } ], "_prefab": { - "__id__": 194 + "__id__": 192 }, "_lpos": { "__type__": "cc.Vec3", @@ -4244,11 +4220,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 189 + "__id__": 187 }, "_enabled": true, "__prefab": { - "__id__": 191 + "__id__": 189 }, "_contentSize": { "__type__": "cc.Size", @@ -4272,11 +4248,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 189 + "__id__": 187 }, "_enabled": true, "__prefab": { - "__id__": 193 + "__id__": 191 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4330,20 +4306,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 188 + "__id__": 186 }, "_children": [], "_active": true, "_components": [ { - "__id__": 196 + "__id__": 194 }, { - "__id__": 198 + "__id__": 196 } ], "_prefab": { - "__id__": 200 + "__id__": 198 }, "_lpos": { "__type__": "cc.Vec3", @@ -4380,11 +4356,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 195 + "__id__": 193 }, "_enabled": true, "__prefab": { - "__id__": 197 + "__id__": 195 }, "_contentSize": { "__type__": "cc.Size", @@ -4408,11 +4384,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 195 + "__id__": 193 }, "_enabled": true, "__prefab": { - "__id__": 199 + "__id__": 197 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4466,20 +4442,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 188 + "__id__": 186 }, "_children": [], "_active": true, "_components": [ { - "__id__": 202 + "__id__": 200 }, { - "__id__": 204 + "__id__": 202 } ], "_prefab": { - "__id__": 206 + "__id__": 204 }, "_lpos": { "__type__": "cc.Vec3", @@ -4516,11 +4492,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 201 + "__id__": 199 }, "_enabled": true, "__prefab": { - "__id__": 203 + "__id__": 201 }, "_contentSize": { "__type__": "cc.Size", @@ -4544,11 +4520,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 201 + "__id__": 199 }, "_enabled": true, "__prefab": { - "__id__": 205 + "__id__": 203 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4625,11 +4601,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 188 + "__id__": 186 }, "_enabled": true, "__prefab": { - "__id__": 208 + "__id__": 206 }, "_contentSize": { "__type__": "cc.Size", @@ -4670,23 +4646,23 @@ }, "_children": [ { - "__id__": 211 + "__id__": 209 }, { - "__id__": 217 + "__id__": 215 }, { - "__id__": 223 + "__id__": 221 } ], "_active": true, "_components": [ { - "__id__": 229 + "__id__": 227 } ], "_prefab": { - "__id__": 231 + "__id__": 229 }, "_lpos": { "__type__": "cc.Vec3", @@ -4723,20 +4699,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 210 + "__id__": 208 }, "_children": [], "_active": true, "_components": [ { - "__id__": 212 + "__id__": 210 }, { - "__id__": 214 + "__id__": 212 } ], "_prefab": { - "__id__": 216 + "__id__": 214 }, "_lpos": { "__type__": "cc.Vec3", @@ -4773,11 +4749,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 211 + "__id__": 209 }, "_enabled": true, "__prefab": { - "__id__": 213 + "__id__": 211 }, "_contentSize": { "__type__": "cc.Size", @@ -4801,11 +4777,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 211 + "__id__": 209 }, "_enabled": true, "__prefab": { - "__id__": 215 + "__id__": 213 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4859,20 +4835,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 210 + "__id__": 208 }, "_children": [], "_active": true, "_components": [ { - "__id__": 218 + "__id__": 216 }, { - "__id__": 220 + "__id__": 218 } ], "_prefab": { - "__id__": 222 + "__id__": 220 }, "_lpos": { "__type__": "cc.Vec3", @@ -4909,11 +4885,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 217 + "__id__": 215 }, "_enabled": true, "__prefab": { - "__id__": 219 + "__id__": 217 }, "_contentSize": { "__type__": "cc.Size", @@ -4937,11 +4913,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 217 + "__id__": 215 }, "_enabled": true, "__prefab": { - "__id__": 221 + "__id__": 219 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4995,20 +4971,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 210 + "__id__": 208 }, "_children": [], "_active": true, "_components": [ { - "__id__": 224 + "__id__": 222 }, { - "__id__": 226 + "__id__": 224 } ], "_prefab": { - "__id__": 228 + "__id__": 226 }, "_lpos": { "__type__": "cc.Vec3", @@ -5045,11 +5021,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 223 + "__id__": 221 }, "_enabled": true, "__prefab": { - "__id__": 225 + "__id__": 223 }, "_contentSize": { "__type__": "cc.Size", @@ -5073,11 +5049,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 223 + "__id__": 221 }, "_enabled": true, "__prefab": { - "__id__": 227 + "__id__": 225 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5154,11 +5130,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 210 + "__id__": 208 }, "_enabled": true, "__prefab": { - "__id__": 230 + "__id__": 228 }, "_contentSize": { "__type__": "cc.Size", @@ -5199,23 +5175,23 @@ }, "_children": [ { - "__id__": 233 + "__id__": 231 }, { - "__id__": 239 + "__id__": 237 }, { - "__id__": 245 + "__id__": 243 } ], "_active": true, "_components": [ { - "__id__": 251 + "__id__": 249 } ], "_prefab": { - "__id__": 253 + "__id__": 251 }, "_lpos": { "__type__": "cc.Vec3", @@ -5252,20 +5228,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 232 + "__id__": 230 }, "_children": [], "_active": true, "_components": [ { - "__id__": 234 + "__id__": 232 }, { - "__id__": 236 + "__id__": 234 } ], "_prefab": { - "__id__": 238 + "__id__": 236 }, "_lpos": { "__type__": "cc.Vec3", @@ -5302,11 +5278,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 233 + "__id__": 231 }, "_enabled": true, "__prefab": { - "__id__": 235 + "__id__": 233 }, "_contentSize": { "__type__": "cc.Size", @@ -5330,11 +5306,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 233 + "__id__": 231 }, "_enabled": true, "__prefab": { - "__id__": 237 + "__id__": 235 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5388,20 +5364,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 232 + "__id__": 230 }, "_children": [], "_active": true, "_components": [ { - "__id__": 240 + "__id__": 238 }, { - "__id__": 242 + "__id__": 240 } ], "_prefab": { - "__id__": 244 + "__id__": 242 }, "_lpos": { "__type__": "cc.Vec3", @@ -5438,11 +5414,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 239 + "__id__": 237 }, "_enabled": true, "__prefab": { - "__id__": 241 + "__id__": 239 }, "_contentSize": { "__type__": "cc.Size", @@ -5466,11 +5442,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 239 + "__id__": 237 }, "_enabled": true, "__prefab": { - "__id__": 243 + "__id__": 241 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5524,20 +5500,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 232 + "__id__": 230 }, "_children": [], "_active": true, "_components": [ { - "__id__": 246 + "__id__": 244 }, { - "__id__": 248 + "__id__": 246 } ], "_prefab": { - "__id__": 250 + "__id__": 248 }, "_lpos": { "__type__": "cc.Vec3", @@ -5574,11 +5550,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 245 + "__id__": 243 }, "_enabled": true, "__prefab": { - "__id__": 247 + "__id__": 245 }, "_contentSize": { "__type__": "cc.Size", @@ -5602,11 +5578,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 245 + "__id__": 243 }, "_enabled": true, "__prefab": { - "__id__": 249 + "__id__": 247 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5683,11 +5659,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 232 + "__id__": 230 }, "_enabled": true, "__prefab": { - "__id__": 252 + "__id__": 250 }, "_contentSize": { "__type__": "cc.Size", @@ -5728,17 +5704,17 @@ }, "_children": [ { - "__id__": 255 + "__id__": 253 } ], "_active": true, "_components": [ { - "__id__": 261 + "__id__": 259 } ], "_prefab": { - "__id__": 263 + "__id__": 261 }, "_lpos": { "__type__": "cc.Vec3", @@ -5775,20 +5751,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 254 + "__id__": 252 }, "_children": [], "_active": true, "_components": [ { - "__id__": 256 + "__id__": 254 }, { - "__id__": 258 + "__id__": 256 } ], "_prefab": { - "__id__": 260 + "__id__": 258 }, "_lpos": { "__type__": "cc.Vec3", @@ -5825,11 +5801,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 255 + "__id__": 253 }, "_enabled": true, "__prefab": { - "__id__": 257 + "__id__": 255 }, "_contentSize": { "__type__": "cc.Size", @@ -5853,11 +5829,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 255 + "__id__": 253 }, "_enabled": true, "__prefab": { - "__id__": 259 + "__id__": 257 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5911,11 +5887,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 254 + "__id__": 252 }, "_enabled": true, "__prefab": { - "__id__": 262 + "__id__": 260 }, "_contentSize": { "__type__": "cc.Size", @@ -5956,7 +5932,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 265 + "__id__": 263 }, "_contentSize": { "__type__": "cc.Size", @@ -5984,7 +5960,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 267 + "__id__": 265 }, "_alignFlags": 17, "_target": null, @@ -6010,6 +5986,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "7eDbBEYAdC4KgGZAKuDTDe" }, + { + "__type__": "45cb27deVhFuo65vPWHRI5c", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 125 + }, + "_enabled": true, + "__prefab": { + "__id__": 267 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5aVvw86NRBjKYWZ5JpxlKp" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -12585,6 +12579,9 @@ ], "_active": true, "_components": [ + { + "__id__": 570 + }, { "__id__": 572 }, @@ -12762,7 +12759,7 @@ }, { "__type__": "cc.Node", - "_name": "Label", + "_name": "mission", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -12776,13 +12773,10 @@ }, { "__id__": 567 - }, - { - "__id__": 569 } ], "_prefab": { - "__id__": 571 + "__id__": 569 }, "_lpos": { "__type__": "cc.Vec3", @@ -12863,7 +12857,7 @@ "b": 255, "a": 255 }, - "_string": "第 {{0}} 关", + "_string": "第 1 关", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 35, @@ -12909,30 +12903,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "18VxBaqFJJYLj3blJbWlZm" }, - { - "__type__": "545c05XsG9GDJispEGWKvYv", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 564 - }, - "_enabled": true, - "__prefab": { - "__id__": 570 - }, - "templateMode": true, - "watchPath": "data.data.mission", - "labelType": "cc.Label", - "watchPathArr": [ - "data.data.mission" - ], - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "f4jnZZ/ohKob+c1Srb1GGb" - }, { "__type__": "cc.PrefabInfo", "root": { @@ -12956,7 +12926,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 573 + "__id__": 571 }, "_contentSize": { "__type__": "cc.Size", @@ -12984,7 +12954,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 575 + "__id__": 573 }, "_alignFlags": 17, "_target": null, @@ -13010,6 +12980,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "f1Bc/T2x1ABJqiBEvgMNUd" }, + { + "__type__": "45cb27deVhFuo65vPWHRI5c", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 557 + }, + "_enabled": true, + "__prefab": { + "__id__": 575 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "090v2KQc5DvKiwI35Z2pWs" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -34438,11 +34426,14 @@ "__id__": 1597 }, { - "__id__": 1799 + "__id__": 1797 } ], "_active": true, "_components": [ + { + "__id__": 1801 + }, { "__id__": 1803 }, @@ -34484,7 +34475,7 @@ }, { "__type__": "cc.Node", - "_name": "zican", + "_name": "bar", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -34506,6 +34497,9 @@ ], "_active": true, "_components": [ + { + "__id__": 1788 + }, { "__id__": 1790 }, @@ -34514,13 +34508,10 @@ }, { "__id__": 1794 - }, - { - "__id__": 1796 } ], "_prefab": { - "__id__": 1798 + "__id__": 1796 }, "_lpos": { "__type__": "cc.Vec3", @@ -35031,11 +35022,11 @@ "b": 255, "a": 255 }, - "_string": "{{0:kmbt}}", + "_string": "999999", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", "_lineHeight": 35, "_overflow": 2, @@ -35121,7 +35112,7 @@ "node": { "__id__": 1613 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 1621 }, @@ -36125,11 +36116,11 @@ "b": 255, "a": 255 }, - "_string": "{{0:int}}", + "_string": "999999", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", "_lineHeight": 35, "_overflow": 2, @@ -36215,7 +36206,7 @@ "node": { "__id__": 1661 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 1669 }, @@ -37309,7 +37300,7 @@ "node": { "__id__": 1709 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 1717 }, @@ -37852,17 +37843,17 @@ "__id__": 1757 }, { - "__id__": 1767 + "__id__": 1765 } ], "_active": true, "_components": [ { - "__id__": 1787 + "__id__": 1785 } ], "_prefab": { - "__id__": 1789 + "__id__": 1787 }, "_lpos": { "__type__": "cc.Vec3", @@ -38226,13 +38217,10 @@ }, { "__id__": 1762 - }, - { - "__id__": 1764 } ], "_prefab": { - "__id__": 1766 + "__id__": 1764 }, "_lpos": { "__type__": "cc.Vec3", @@ -38313,11 +38301,11 @@ "b": 255, "a": 255 }, - "_string": "{{0:int}}", + "_string": "999999", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", "_lineHeight": 35, "_overflow": 2, @@ -38395,30 +38383,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "25PTq9R+ZINrH4pe1/0aOa" }, - { - "__type__": "545c05XsG9GDJispEGWKvYv", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1757 - }, - "_enabled": true, - "__prefab": { - "__id__": 1765 - }, - "templateMode": true, - "watchPath": "", - "labelType": "cc.Label", - "watchPathArr": [ - "data.data.meat" - ], - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a8ZhFTQntMQqUniFX+mAGy" - }, { "__type__": "cc.PrefabInfo", "root": { @@ -38442,26 +38406,26 @@ }, "_children": [ { - "__id__": 1768 + "__id__": 1766 }, { - "__id__": 1774 + "__id__": 1772 } ], "_active": true, "_components": [ + { + "__id__": 1778 + }, { "__id__": 1780 }, { "__id__": 1782 - }, - { - "__id__": 1784 } ], "_prefab": { - "__id__": 1786 + "__id__": 1784 }, "_lpos": { "__type__": "cc.Vec3", @@ -38498,20 +38462,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 1767 + "__id__": 1765 }, "_children": [], "_active": true, "_components": [ { - "__id__": 1769 + "__id__": 1767 }, { - "__id__": 1771 + "__id__": 1769 } ], "_prefab": { - "__id__": 1773 + "__id__": 1771 }, "_lpos": { "__type__": "cc.Vec3", @@ -38548,11 +38512,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1768 + "__id__": 1766 }, "_enabled": true, "__prefab": { - "__id__": 1770 + "__id__": 1768 }, "_contentSize": { "__type__": "cc.Size", @@ -38576,11 +38540,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1768 + "__id__": 1766 }, "_enabled": true, "__prefab": { - "__id__": 1772 + "__id__": 1770 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -38634,20 +38598,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 1767 + "__id__": 1765 }, "_children": [], "_active": true, "_components": [ { - "__id__": 1775 + "__id__": 1773 }, { - "__id__": 1777 + "__id__": 1775 } ], "_prefab": { - "__id__": 1779 + "__id__": 1777 }, "_lpos": { "__type__": "cc.Vec3", @@ -38684,11 +38648,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1774 + "__id__": 1772 }, "_enabled": true, "__prefab": { - "__id__": 1776 + "__id__": 1774 }, "_contentSize": { "__type__": "cc.Size", @@ -38712,11 +38676,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1774 + "__id__": 1772 }, "_enabled": true, "__prefab": { - "__id__": 1778 + "__id__": 1776 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -38770,11 +38734,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1767 + "__id__": 1765 }, "_enabled": true, "__prefab": { - "__id__": 1781 + "__id__": 1779 }, "_contentSize": { "__type__": "cc.Size", @@ -38798,11 +38762,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1767 + "__id__": 1765 }, "_enabled": true, "__prefab": { - "__id__": 1783 + "__id__": 1781 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -38843,11 +38807,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1767 + "__id__": 1765 }, "_enabled": true, "__prefab": { - "__id__": 1785 + "__id__": 1783 }, "_alignFlags": 32, "_target": null, @@ -38896,7 +38860,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1788 + "__id__": 1786 }, "_contentSize": { "__type__": "cc.Size", @@ -38937,7 +38901,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1791 + "__id__": 1789 }, "_contentSize": { "__type__": "cc.Size", @@ -38965,7 +38929,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1793 + "__id__": 1791 }, "_alignFlags": 8, "_target": null, @@ -39001,7 +38965,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1795 + "__id__": 1793 }, "_resizeMode": 0, "_layoutType": 1, @@ -39039,7 +39003,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1797 + "__id__": 1795 }, "_alignFlags": 40, "_target": null, @@ -39090,11 +39054,11 @@ "_active": true, "_components": [ { - "__id__": 1800 + "__id__": 1798 } ], "_prefab": { - "__id__": 1802 + "__id__": 1800 }, "_lpos": { "__type__": "cc.Vec3", @@ -39131,11 +39095,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 1799 + "__id__": 1797 }, "_enabled": true, "__prefab": { - "__id__": 1801 + "__id__": 1799 }, "_contentSize": { "__type__": "cc.Size", @@ -39176,7 +39140,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1804 + "__id__": 1802 }, "_contentSize": { "__type__": "cc.Size", @@ -39204,7 +39168,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1806 + "__id__": 1804 }, "_alignFlags": 17, "_target": null, @@ -39230,6 +39194,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "52mhkKH89DVKECWS3HY4Qh" }, + { + "__type__": "f05bcVVHW1Jt5BHMwVKO3rc", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1596 + }, + "_enabled": true, + "__prefab": { + "__id__": 1806 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f1BI4v8h1BnbtwxoUY04B/" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index dc8d8bb3..7747d611 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -56,14 +56,6 @@ export class SingletonModuleComp extends ecs.Comp { vmdata: any = { game_over:false, game_pause:false, - data:{ - score:0, - mission:1, - gold:100, //升级主要资源 - diamond:100, //商店购买 及 双倍奖励资源 - meat:0, - exp:0, - }, mission_data:{ mon_num:0,//怪物数量 hero_num:0,//英雄数量 diff --git a/assets/script/game/common/config/BoxSet.ts b/assets/script/game/common/config/BoxSet.ts index 51608325..473b289a 100644 --- a/assets/script/game/common/config/BoxSet.ts +++ b/assets/script/game/common/config/BoxSet.ts @@ -68,3 +68,51 @@ export enum QualitySet{ PURPLE=2, ORANGE=3, } + +/** 数字格式化工具函数 */ +export class NumberFormatter { + /** + * 将数字转换为易读格式 + * @param num 要转换的数字 + * @returns 格式化后的字符串 + * 例如:1234 -> "1.2k", 1234567 -> "1.2M", 1234567890 -> "1.2B" + */ + static formatNumber(num: number): string { + if (num < 1000) { + return num.toString(); + } else if (num < 1000000) { + // 5位数用k表示 (1000-999999) + return (num / 1000).toFixed(1).replace(/\.0$/, '') + 'k'; + } else if (num < 1000000000) { + // 7位数用M表示 (1000000-999999999) + return (num / 1000000).toFixed(1).replace(/\.0$/, '') + 'M'; + } else if (num < 1000000000000) { + // 10位数用B表示 (1000000000-999999999999) + return (num / 1000000000).toFixed(1).replace(/\.0$/, '') + 'B'; + } else { + // 更大的数字用T表示 + return (num / 1000000000000).toFixed(1).replace(/\.0$/, '') + 'T'; + } + } + + /** + * 将数字转换为中文格式 + * @param num 要转换的数字 + * @returns 中文格式的字符串 + * 例如:1234 -> "1.2千", 1234567 -> "1.2百万" + */ + static formatNumberChinese(num: number): string { + if (num < 10000) { + return num.toString(); + } else if (num < 100000000) { + // 万级别 + return (num / 10000).toFixed(1).replace(/\.0$/, '') + '万'; + } else if (num < 1000000000000) { + // 亿级别 + return (num / 100000000).toFixed(1).replace(/\.0$/, '') + '亿'; + } else { + // 万亿级别 + return (num / 1000000000000).toFixed(1).replace(/\.0$/, '') + '万亿'; + } + } +} diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index 4496371c..66eeadc8 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -15,17 +15,12 @@ export enum GameEvent { MAP_MOVE_END_LEFT = "MAP_MOVE_END_LEFT", MAP_MOVE_END_RIGHT = "MAP_MOVE_END_RIGHT", UpdateHero = "UpdateHero", - MSSelected = "MSSelected", - LifeChange = "LifeChange", CastSkill = "CastSkill", CardsClose = "CardsClose", CardRefresh = "CardRefresh", - UseCard = "UseCard", UseHeroCard = "UseHeroCard", UseSkillCard = "UseSkillCard", UseSpecialCard = "UseSpecialCard", - MaxSkill = "MaxSkill", - UseEquipCard = "UseEquipCard", CallHero = "CallHero", Zhaohuan = "Zhaohuan", MissionLoss = "MissionLoss", @@ -38,7 +33,6 @@ export enum GameEvent { EnhancementSelect = "EnhancementSelect", CanUpdateLv = "CanUpdateLv", UseEnhancement = "UseEnhancement", - LuckCardUsed = "LuckCardUsed", MasterCalled = "MasterCalled", FightStart = "FightStart", FightPause = "FightPause", @@ -47,23 +41,12 @@ export enum GameEvent { MissionEnd = "MissionEnd", MissionComplete = "MissionComplete",//战斗结算完成 CastHeroSkill = "CastHeroSkill", - EquipChange = "EquipChange", EquipAdd = "EquipAdd", - EquipRemove = "EquipRemove", EquipSelect = "EquipSelect", FuncSelect = "FuncSelect", TalentSelect = "TalentSelect", UseTalentCard = "UseTalentCard", - RemoveTalent = "RemoveTalent", - ChangeTalent = "ChangeTalent", - RefreshCard = "RefreshCard", NewWave = "NewWave", - ChangeATK = "ChangeATK", - ChangeATK_EQUIP_SPECIAL_ATTR = "ChangeATK_EQUIP_SPECIAL_ATTR", - UpdateVMData = "UpdateVMData", - UpdateHP = "UpdateHP", - APChange = "APChange", - EXPUP = "EXPUP", AD_BACK_TRUE = "AD_BACK_TRUE", AD_BACK_FALSE = "AD_BACK_FALSE", DO_AD_BACK = "DO_AD_BACK", @@ -72,4 +55,8 @@ export enum GameEvent { HeroLvUp = "HeroLvUp", MonDead = "MonDead", HeroDead = "HeroDead", + GOLD_UPDATE = "GOLD_UPDATE", + DIAMOND_UPDATE = "DIAMOND_UPDATE", + MEAT_UPDATE = "MEAT_UPDATE", + MISSION_UPDATE = "MISSION_UPDATE", } \ No newline at end of file diff --git a/assets/script/game/hero/HeroConComp.ts b/assets/script/game/hero/HeroConComp.ts index 16d40a74..b8fa3067 100644 --- a/assets/script/game/hero/HeroConComp.ts +++ b/assets/script/game/hero/HeroConComp.ts @@ -17,121 +17,16 @@ const { ccclass, property } = _decorator; export class HeroConComp extends CCComp { private heroView: HeroViewComp = null; - // Buff处理方法映射表 - private static readonly BUFF_HANDLERS = new Map([ - [BuffAttr.AP, 'handleAPBuff'], - [BuffAttr.ATK, 'handleATKBuff'], - [BuffAttr.ATK_CD, 'handleSpeedBuff'], - [BuffAttr.DEF, 'handleDefBuff'], - [BuffAttr.HP, 'handleHPBuff'], // 生命值比例 - [BuffAttr.HP_MAX, 'handleHPMaxBuff'], // 生命值数值 - [BuffAttr.CRITICAL, 'handleCritBuff'], - [BuffAttr.CRITICAL_DMG, 'handleCritDmgBuff'], - [BuffAttr.DODGE, 'handleDodgeBuff'], - [BuffAttr.PUNCTURE, 'handlePunctureBuff'], - [BuffAttr.PUNCTURE_DMG, 'handlePunctureDmgBuff'], - [BuffAttr.FROST_RATIO, 'handleFrostBuff'], - [BuffAttr.KNOCKBACK, 'handleKnockbackBuff'], - [BuffAttr.STUN_RATIO, 'handleStunBuff'], - [BuffAttr.REFLECT, 'handleReflectBuff'], - [BuffAttr.LIFESTEAL, 'handleLifestealBuff'] - ]); + protected onLoad(): void { this.heroView = this.node.getComponent(HeroViewComp); - this.registerEvents(); + } - private registerEvents(): void { - this.on(GameEvent.EquipAdd, this.onEquipAdd, this); - this.on(GameEvent.EquipChange, this.onEquipChange, this); - this.on(GameEvent.FightReady, this.onFightReady, this); - this.on(GameEvent.UseSpecialCard, this.onUseSpecialCard, this); - this.on(GameEvent.UseEnhancement, this.onUseEnhancement, this); - this.on(GameEvent.UseTalentCard, this.onUseTalentCard, this); - this.on(GameEvent.RemoveTalent, this.onRemoveTalentCard, this); - this.on(GameEvent.LuckCardUsed, this.onLuckCardUsed, this); - } - private onEquipAdd(e: GameEvent, data: any): void { - const equip = EquipInfo[data.uuid]; - if (!equip?.buff) return; - - equip.buff - .filter(buff => buff.target === EquipAttrTarget.HERO) - .forEach(buff => this.applyBuff(buff.type, buff.value)); - } - private onEquipChange(e: GameEvent, data: any): void { - // TODO: 处理装备变更逻辑 - } - private onFightReady(e: GameEvent, data: any): void { - // TODO: 处理战斗准备逻辑 - } - - private onUseSpecialCard(e: GameEvent, data: any): void { - // TODO: 处理特殊卡牌使用逻辑 - } - private onUseEnhancement(e: GameEvent, data: any): void { - const enhancementMap = { - [EnhancementType.ATTACK]: () => this.handleATKBuff(data.value), - [EnhancementType.ATTACK_SPEED]: () => this.handleSpeedBuff(data.value), - [EnhancementType.HEALTH]: () => this.handleHPMaxBuff(data.value), - [EnhancementType.DEF]: () => this.handleDefBuff(data.value) - }; - - enhancementMap[data.type]?.(); - } - - private onUseTalentCard(e: GameEvent, data: any): void { - const talent = TalentList[data.uuid]; - if (talent) { - this.applyBuff(talent.buffType, talent.value); - } - } - - private onRemoveTalentCard(e: GameEvent, data: any): void { - const talent = TalentList[data.uuid]; - if (talent) { - this.applyBuff(talent.buffType, -talent.value); - } - } - - private onLuckCardUsed(e: GameEvent, card: any): void { - switch (card.type) { - case SuperCardsType.BUFF: - this.applyBuff(card.value1, card.value2); - break; - case SuperCardsType.AOE: - // TODO: 处理AOE技能 - break; - } - } - /** 统一的Buff应用方法 */ - private applyBuff(buffType: BuffAttr, value: number): void { - const handlerName = HeroConComp.BUFF_HANDLERS.get(buffType); - if (handlerName && typeof this[handlerName] === 'function') { - this[handlerName](value); - } - } - - // Buff处理方法 - private handleAPBuff(value: number): void { this.heroView.apply_buff(BuffAttr.AP, value); } - private handleATKBuff(value: number): void { this.heroView.apply_buff(BuffAttr.ATK, value); } - private handleSpeedBuff(value: number): void { this.heroView.apply_buff(BuffAttr.ATK_CD, value); } - private handleDefBuff(value: number): void { this.heroView.apply_buff(BuffAttr.DEF, value); } - private handleHPBuff(value: number): void { this.heroView.apply_buff(BuffAttr.HP, value); } - private handleHPMaxBuff(value: number): void { this.heroView.apply_buff(BuffAttr.HP_MAX, value); } - private handleCritBuff(value: number): void { this.heroView.apply_buff(BuffAttr.CRITICAL, value); } - private handleCritDmgBuff(value: number): void { this.heroView.apply_buff(BuffAttr.CRITICAL_DMG, value); } - private handleDodgeBuff(value: number): void { this.heroView.apply_buff(BuffAttr.DODGE, value); } - private handlePunctureBuff(value: number): void { this.heroView.apply_buff(BuffAttr.PUNCTURE, value); } - private handlePunctureDmgBuff(value: number): void { this.heroView.apply_buff(BuffAttr.PUNCTURE_DMG, value); } - private handleFrostBuff(value: number): void { this.heroView.apply_buff(BuffAttr.FROST_RATIO, value); } - private handleKnockbackBuff(value: number): void { this.heroView.apply_buff(BuffAttr.KNOCKBACK, value); } - private handleStunBuff(value: number): void { this.heroView.apply_buff(BuffAttr.STUN_RATIO, value); } - private handleReflectBuff(value: number): void { this.heroView.apply_buff(BuffAttr.REFLECT, value); } - private handleLifestealBuff(value: number): void { this.heroView.apply_buff(BuffAttr.LIFESTEAL, value); } + /** 组件重置 */ reset(): void { this.node.destroy(); diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index aeca6c3b..37144deb 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -124,7 +124,6 @@ export class HeroViewComp extends CCComp { onLoad() { this.as = this.getComponent(HeroSpine); //console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON) - this.on(GameEvent.EXPUP,this.exp_up,this) this.on(GameEvent.HeroLvUp,this.to_update_lv,this) this.on(GameEvent.FightEnd,this.do_fight_end,this) const collider = this.node.getComponent(BoxCollider2D); @@ -280,6 +279,7 @@ export class HeroViewComp extends CCComp { for(let i=0;i0){ @@ -287,9 +287,11 @@ export class HeroViewComp extends CCComp { } if(gold>0){ smc.addGold(gold) + oops.message.dispatchEvent(GameEvent.GOLD_UPDATE) } if(diamond>0){ smc.addDiamond(diamond) + oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE) } console.log("[HeroViewComp]:do_drop",this.hero_uuid,drop_item,exp,gold,diamond) } @@ -528,11 +530,7 @@ export class HeroViewComp extends CCComp { //console.log("[HeroViewComp]:crit",crit) return false } - // dead(){ - // this.BUFFCOMP.dead() - // this.to_drop() - - // } + do_dead_trigger(){ //死亡特殊处理 if(this.is_dead||this.fac==FacSet.MON) return @@ -556,13 +554,7 @@ export class HeroViewComp extends CCComp { // this.node.setPosition(HeroPos[this.fight_pos].pos) // this.BUFFCOMP.heathed() // } - //掉落物品 - to_drop(){ - // let Drops = getMonsterDrops(1, MonsterType.Normal, 1.2); - // if(this.is_boss) Drops =getMonsterDrops(1, MonsterType.Elite, 1.2); - // if(this.is_big_boss) Drops =getMonsterDrops(1, MonsterType.Boss, 1.2); - } - + to_console(value:any,value2:any=null,value3:any=null){ //console.log("["+this.scale+this.hero_name+']'+value,value2,value3) } @@ -592,10 +584,7 @@ export class HeroViewComp extends CCComp { } } - exp_up(e:any,data:any){ - - - } + to_update_lv(event:string,data:any){ if(this.fac==FacSet.MON) return diff --git a/assets/script/game/map/HCardUICom.ts b/assets/script/game/map/HCardUICom.ts index 1e158623..d260c59f 100644 --- a/assets/script/game/map/HCardUICom.ts +++ b/assets/script/game/map/HCardUICom.ts @@ -17,9 +17,14 @@ export class HCardUICom extends Component { start() { console.log("[HCardUICom]:start") } - + protected onLoad(): void { + oops.message.on(GameEvent.UpdateHero,this.to_update_hero,this) + } update(deltaTime: number) { + } + to_update_hero(){ + this.update_data(this.h_uuid,{type:this.type}) } update_data(uuid:number,args:any){ this.type=args.type diff --git a/assets/script/game/map/MInfoComp.ts b/assets/script/game/map/MInfoComp.ts new file mode 100644 index 00000000..86aff305 --- /dev/null +++ b/assets/script/game/map/MInfoComp.ts @@ -0,0 +1,27 @@ +import { _decorator, Component, Label, Node } from 'cc'; +import { oops } from 'db://oops-framework/core/Oops'; +import { GameEvent } from '../common/config/GameEvent'; +import { smc } from '../common/SingletonModuleComp'; +const { ccclass, property } = _decorator; + +@ccclass('MInfoComp') +export class MInfoComp extends Component { + protected onLoad(): void { + oops.message.on(GameEvent.MISSION_UPDATE,this.onMissionUpdate,this); + this.update_mission(smc.data.mission) + } + start() { + this.update_mission(smc.data.mission) + } + onMissionUpdate(event:string,data:any){ + this.update_mission(smc.data.mission) + } + + update_mission(mission:number){ + this.node.getChildByName("mission").getComponent(Label).string="第 "+mission.toString()+" 关" + } + + +} + + diff --git a/assets/script/game/map/MInfoComp.ts.meta b/assets/script/game/map/MInfoComp.ts.meta new file mode 100644 index 00000000..f518ccf8 --- /dev/null +++ b/assets/script/game/map/MInfoComp.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "45cb2edd-7958-45ba-8eb9-bcf587448e5c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/map/TopComp.ts b/assets/script/game/map/TopComp.ts new file mode 100644 index 00000000..590376c5 --- /dev/null +++ b/assets/script/game/map/TopComp.ts @@ -0,0 +1,61 @@ +import { _decorator, Component, Label, Node, tween, v3 } from 'cc'; +import { GameEvent } from '../common/config/GameEvent'; +import { smc } from '../common/SingletonModuleComp'; +import { BoxSet, NumberFormatter } from '../common/config/BoxSet'; +import { oops } from 'db://oops-framework/core/Oops'; +const { ccclass, property } = _decorator; + +@ccclass('topComp') +export class topComp extends Component { + protected onLoad(): void { + oops.message.on(GameEvent.GOLD_UPDATE,this.onGoldUpdate,this); + oops.message.on(GameEvent.DIAMOND_UPDATE,this.onDiamondUpdate,this); + oops.message.on(GameEvent.MEAT_UPDATE,this.onMeatUpdate,this); + this.update_all() + } + start() { + + } + onGoldUpdate(event:string,data:any){ + this.update_gold(smc.data.gold) + tween(this.node.getChildByName("bar").getChildByName("gold").getChildByName("num").getComponent(Label).node) + .to(0.1,{scale:v3(1.2,1.2,1)}) + .to(0.1,{scale:v3(1,1,1)}) + .start() + } + onDiamondUpdate(event:string,data:any){ + this.update_diamond(smc.data.diamond) + tween(this.node.getChildByName("bar").getChildByName("diamond").getChildByName("num").getComponent(Label).node) + .to(0.1,{scale:v3(1.2,1.2,1)}) + .to(0.1,{scale:v3(1,1,1)}) + .start() + } + onMeatUpdate(event:string,data:any){ + this.update_meat(smc.data.meat) + tween(this.node.getChildByName("bar").getChildByName("meat").getChildByName("num").getComponent(Label).node) + .to(0.1,{scale:v3(1.2,1.2,1)}) + .to(0.1,{scale:v3(1,1,1)}) + .start() + } + + update_gold(gold:number){ + this.node.getChildByName("bar").getChildByName("gold").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(gold); + } + update_diamond(diamond:number){ + this.node.getChildByName("bar").getChildByName("diamond").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(diamond); + } + update_meat(meat:number){ + this.node.getChildByName("bar").getChildByName("meat").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(meat); + } + update_all(){ + this.update_gold(smc.data.gold) + this.update_diamond(smc.data.diamond) + this.update_meat(smc.data.meat) + } + + update(deltaTime: number) { + + } +} + + diff --git a/assets/script/game/map/TopComp.ts.meta b/assets/script/game/map/TopComp.ts.meta new file mode 100644 index 00000000..d8cd8885 --- /dev/null +++ b/assets/script/game/map/TopComp.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "f05bc555-1d6d-49b7-9047-33054a3b7adc", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/wx_clound_client_api/USAGE.md b/assets/script/game/wx_clound_client_api/USAGE.md index aa8dae96..c7c261f0 100644 --- a/assets/script/game/wx_clound_client_api/USAGE.md +++ b/assets/script/game/wx_clound_client_api/USAGE.md @@ -445,3 +445,4 @@ export class GameDataManager { + diff --git a/build-templates/wechatgame/cloud_functions/cocos_cloud/API.md b/build-templates/wechatgame/cloud_functions/cocos_cloud/API.md index 8d7e9247..4f2bd63c 100644 --- a/build-templates/wechatgame/cloud_functions/cocos_cloud/API.md +++ b/build-templates/wechatgame/cloud_functions/cocos_cloud/API.md @@ -915,3 +915,4 @@ wx.cloud.callFunction({ + diff --git a/build-templates/wechatgame/cloud_functions/cocos_cloud/modules/response.js b/build-templates/wechatgame/cloud_functions/cocos_cloud/modules/response.js index 550d62cb..657206b6 100644 --- a/build-templates/wechatgame/cloud_functions/cocos_cloud/modules/response.js +++ b/build-templates/wechatgame/cloud_functions/cocos_cloud/modules/response.js @@ -269,3 +269,4 @@ module.exports = { +