From 6883916de1d2f532fc96ef925872578fdf2057ba Mon Sep 17 00:00:00 2001 From: panfudan Date: Thu, 5 Jun 2025 23:06:53 +0800 Subject: [PATCH] dd --- assets/resources/game/heros/hart.prefab | 23 +- assets/resources/gui/role_controller.prefab | 356 +++++++++--------- assets/script/game/common/config/GameEvent.ts | 1 + .../script/game/common/config/MissionEvent.ts | 11 + .../game/common/config/MissionEvent.ts.meta | 9 + assets/script/game/hero/HartModelComp.ts | 25 +- assets/script/game/hero/HeroInfoComp.ts | 1 - assets/script/game/hero/SkillConComp.ts | 38 +- assets/script/game/map/EquipsComp.ts | 6 +- assets/script/game/map/MissionComp.ts | 4 +- assets/script/game/map/MissionHomeComp.ts | 1 - assets/script/game/map/VictoryComp.ts | 1 - 12 files changed, 271 insertions(+), 205 deletions(-) create mode 100644 assets/script/game/common/config/MissionEvent.ts create mode 100644 assets/script/game/common/config/MissionEvent.ts.meta diff --git a/assets/resources/game/heros/hart.prefab b/assets/resources/game/heros/hart.prefab index 5f128948..a8e24b66 100644 --- a/assets/resources/game/heros/hart.prefab +++ b/assets/resources/game/heros/hart.prefab @@ -71,10 +71,13 @@ }, { "__id__": 109 + }, + { + "__id__": 111 } ], "_prefab": { - "__id__": 111 + "__id__": 113 }, "_lpos": { "__type__": "cc.Vec3", @@ -1713,6 +1716,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "2a13RCH/1KEIh8ZZgHg7EK" }, + { + "__type__": "a32cdTNd5dO8L8tvTFo+9DM", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 112 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ceRMYb4NtFVYAU2W21lSFz" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index e2b9943a..3f842ebf 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -2726,7 +2726,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -2778,7 +2778,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -2820,18 +2820,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "cfccD/hShC/prdYpF9YXXv" + "fileId": "d3mxI+aOVMFLHvBzzRvj8A" }, { "__type__": "cc.Sprite", @@ -2850,33 +2850,33 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c86+qGlzRAeaNmhWgCG2e1" + "fileId": "943qA5X5VPjKzaPyK3wg/T" }, { "__type__": "cc.Widget", @@ -2892,8 +2892,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -2912,7 +2912,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c3PLY5DuNDyaH3+S4M6p7n" + "fileId": "1848XjJlhOCbx5JlVqdqUd" }, { "__type__": "cc.PrefabInfo", @@ -2922,7 +2922,7 @@ "asset": { "__id__": 0 }, - "fileId": "31W7CBPqRCKo9wKJLojkUI", + "fileId": "d7tBiPer9L3YsYa+7wXFxj", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -2942,18 +2942,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "e68/WXPy5HGZ+vQTHGW/D2" + "fileId": "58KXNiOu1MxIoPV9qrV8Ko" }, { "__type__": "cc.Sprite", @@ -2998,7 +2998,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "3eVaBkzVFF7J7vgWhmL5gN" + "fileId": "e5nKZ47XtCtaqGHPkF1lk9" }, { "__type__": "cc.ProgressBar", @@ -3015,15 +3015,15 @@ "_barSprite": { "__id__": 131 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "35k41Eda5FVp3YDurS7WAN" + "fileId": "94YTkFdP5J1rFRjFGh40wA" }, { "__type__": "cc.PrefabInfo", @@ -3033,7 +3033,7 @@ "asset": { "__id__": 0 }, - "fileId": "329RuZkKJMfolq/iAM6edI", + "fileId": "d5QZelbbNPP6W4/XaUq+Ie", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -4293,7 +4293,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -4345,7 +4345,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -4387,18 +4387,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "97iD2WoWpNFbAXvgOq7Kp7" + "fileId": "c1Ph9zbLNJoLlMvDu5SF6h" }, { "__type__": "cc.Sprite", @@ -4417,33 +4417,33 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c6O9WK7N9MrrT8Qlc70x/g" + "fileId": "abW4qCtcRLT6kiTPJGAAap" }, { "__type__": "cc.Widget", @@ -4459,8 +4459,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -4479,7 +4479,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "397criW6xBwZNGPysnSwhp" + "fileId": "91eZzLGOlCe47yKaEsh3/1" }, { "__type__": "cc.PrefabInfo", @@ -4489,7 +4489,7 @@ "asset": { "__id__": 0 }, - "fileId": "61oekmXUxMS4OCVfEscixB", + "fileId": "b2yNiyT9VBU4o/OlzOhOfI", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -4509,18 +4509,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "3amvpa4zxEvpcF8IYdrDkZ" + "fileId": "61REmVU8tDeZtwWOpGuUAh" }, { "__type__": "cc.Sprite", @@ -4565,7 +4565,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "41BtNNyahNjLq3O/CMdB78" + "fileId": "3f82gpoNNBeLQQt4hoLaB7" }, { "__type__": "cc.ProgressBar", @@ -4582,15 +4582,15 @@ "_barSprite": { "__id__": 201 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "24IWZ0bAZHEIheW/x4bgPp" + "fileId": "ebZ7qyj4dCdbws1xT+srF/" }, { "__type__": "cc.PrefabInfo", @@ -4600,7 +4600,7 @@ "asset": { "__id__": 0 }, - "fileId": "11DLo5bcxDz4uPC5NqLk3p", + "fileId": "6dLgZH5sNMRYM6AbkXMg3S", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -5860,7 +5860,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -5912,7 +5912,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -5954,18 +5954,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "a2dtP0kh9PN7SNQ4+A7G+3" + "fileId": "19HMGp8RtJGa3kfxiXLnbm" }, { "__type__": "cc.Sprite", @@ -5984,33 +5984,33 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "6fQBeDrPlG/IBVavqtb7mO" + "fileId": "4eeikur9VJ55oyDwryA8W9" }, { "__type__": "cc.Widget", @@ -6026,8 +6026,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -6046,7 +6046,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "05unIrchlD6antA/VejfOy" + "fileId": "49RAYOGIxIb5nFW9J7CFWg" }, { "__type__": "cc.PrefabInfo", @@ -6056,7 +6056,7 @@ "asset": { "__id__": 0 }, - "fileId": "dcigNCWK9A+5njyXp7/sa0", + "fileId": "1cgaYCXydHuKpUTDgUiTWy", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -6076,18 +6076,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "f2I4G8x/ZEkKsNUCswl2k3" + "fileId": "eexekUmCdJIarOivDQoMO4" }, { "__type__": "cc.Sprite", @@ -6132,7 +6132,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "afX9PYS/NF8LFsHjCEjJVh" + "fileId": "b5ip/UhjlPMqhFNreMLTT8" }, { "__type__": "cc.ProgressBar", @@ -6149,15 +6149,15 @@ "_barSprite": { "__id__": 271 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "92S3KmwBdCQ7sPPzk5cYn4" + "fileId": "d4bj5/gw5DAKSI6uNsdrpd" }, { "__type__": "cc.PrefabInfo", @@ -6167,7 +6167,7 @@ "asset": { "__id__": 0 }, - "fileId": "6cxybfIwtAybP1Ja0e4U8j", + "fileId": "26EM0SIOlHM6hqTIvKQtEd", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -7027,7 +7027,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -7079,7 +7079,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -7121,12 +7121,12 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, @@ -7151,27 +7151,27 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, @@ -7193,8 +7193,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -7243,12 +7243,12 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, @@ -7316,10 +7316,10 @@ "_barSprite": { "__id__": 323 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { @@ -8792,7 +8792,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -8844,7 +8844,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -8886,18 +8886,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "16+2aP6CZFcobU8dTRLas+" + "fileId": "e6dNKTTOJO/50R/Ez3g1//" }, { "__type__": "cc.Sprite", @@ -8916,33 +8916,33 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "derzw5FCNG/YpoUuIEvWLh" + "fileId": "6eGB7tlLpPX7qxaQt8jE8l" }, { "__type__": "cc.Widget", @@ -8958,8 +8958,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -8978,7 +8978,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "56wK/KaXpJW64vruzKK37z" + "fileId": "85g8sIf7pFl6hnvNRl37tY" }, { "__type__": "cc.PrefabInfo", @@ -8988,7 +8988,7 @@ "asset": { "__id__": 0 }, - "fileId": "66b2nyGAtJkIfaQHWob/2M", + "fileId": "3bF0599WlPc72KlMJa3+HY", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -9008,18 +9008,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "aeLLWNToFKHYXPkgBs0mLM" + "fileId": "2bwX3bZ4lDHplfbrbMEXE6" }, { "__type__": "cc.Sprite", @@ -9064,7 +9064,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "10TadpJGBKW6UyHxzSlWiY" + "fileId": "ddJDlZkCZKuKJM6Q83z/6x" }, { "__type__": "cc.ProgressBar", @@ -9081,15 +9081,15 @@ "_barSprite": { "__id__": 399 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "5d7cUzJ55GrqgOh4Pfr3Xa" + "fileId": "9e1vUCRR5N+6co6tLBK+Mm" }, { "__type__": "cc.PrefabInfo", @@ -9099,7 +9099,7 @@ "asset": { "__id__": 0 }, - "fileId": "7298F7l2tGq5YI7s9zsDvZ", + "fileId": "efGKMp3lxGTZWHI7Z7fcat", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -10557,7 +10557,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -47.5, + "y": -55, "z": 0 }, "_lrot": { @@ -10609,7 +10609,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 55, + "x": 0, "y": 0, "z": 0 }, @@ -10651,18 +10651,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 + "x": 0.5, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "ebEPYLZThJn7/t6jp18Wqm" + "fileId": "f5gG2Nr+5MurDLg/5P3/AI" }, { "__type__": "cc.Sprite", @@ -10681,33 +10681,33 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 201 + "r": 7, + "g": 7, + "b": 7, + "a": 124 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@44c8a", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, - "_fillType": 0, + "_type": 3, + "_fillType": 1, "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, "y": 0 }, - "_fillStart": 1, - "_fillRange": 0, + "_fillStart": 0, + "_fillRange": 1, "_isTrimmedMode": true, - "_useGrayscale": false, + "_useGrayscale": true, "_atlas": null, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "02eD5d+6xKEJ79UoZW6CBk" + "fileId": "1aEr4qPVFLb4bch1cNnuuA" }, { "__type__": "cc.Widget", @@ -10723,8 +10723,8 @@ }, "_alignFlags": 40, "_target": null, - "_left": 0, - "_right": 0, + "_left": -55, + "_right": 55, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -10743,7 +10743,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "7d3geUmLRNeYGDxiPNyjpB" + "fileId": "1eg/F6bPBL0KgKSBH2oOge" }, { "__type__": "cc.PrefabInfo", @@ -10753,7 +10753,7 @@ "asset": { "__id__": 0 }, - "fileId": "66lFXxVCtAvL+8X5K3gIzI", + "fileId": "98tf/Z979NmI1niY3RwFu3", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -10773,18 +10773,18 @@ "_contentSize": { "__type__": "cc.Size", "width": 110, - "height": 15 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "70hfVpAwJIqp8XJf9ANlrX" + "fileId": "5cUD03PwdMKLVOH1DYV/0W" }, { "__type__": "cc.Sprite", @@ -10829,7 +10829,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "85KRq2WihBHJcfIzB+gp5p" + "fileId": "962xUjXuNB8KnLQgddRAl+" }, { "__type__": "cc.ProgressBar", @@ -10846,15 +10846,15 @@ "_barSprite": { "__id__": 475 }, - "_mode": 0, - "_totalLength": 110, + "_mode": 2, + "_totalLength": 1, "_progress": 1, - "_reverse": true, + "_reverse": false, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "eeWYByFVpDeKY87N7/Bpd3" + "fileId": "275OhihzVD6IHh4dB5HFHG" }, { "__type__": "cc.PrefabInfo", @@ -10864,7 +10864,7 @@ "asset": { "__id__": 0 }, - "fileId": "24zpRKJ1pPSL2z9VkBaWWW", + "fileId": "eeNtoBvp5DNIgHYUFXgm04", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index 60751660..0fbee98f 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -34,5 +34,6 @@ export enum GameEvent { FightEnd = "FightEnd", MissionEnd = "MissionEnd", MissionComplete = "MissionComplete",//战斗结算完成 + CastHeroSkill = "CastHeroSkill", } \ No newline at end of file diff --git a/assets/script/game/common/config/MissionEvent.ts b/assets/script/game/common/config/MissionEvent.ts new file mode 100644 index 00000000..c0f99983 --- /dev/null +++ b/assets/script/game/common/config/MissionEvent.ts @@ -0,0 +1,11 @@ +/* + * @Author: dgflash + * @Date: 2021-11-23 15:28:39 + * @LastEditors: dgflash + * @LastEditTime: 2022-01-26 16:42:00 + */ + +/** 游戏事件 */ +export enum MissionEvent { + CastHeroSkill = "CastHeroSkill", +} \ No newline at end of file diff --git a/assets/script/game/common/config/MissionEvent.ts.meta b/assets/script/game/common/config/MissionEvent.ts.meta new file mode 100644 index 00000000..57c876a6 --- /dev/null +++ b/assets/script/game/common/config/MissionEvent.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "167eb23c-6d7e-4e30-96ca-06fec16eeaa8", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/hero/HartModelComp.ts b/assets/script/game/hero/HartModelComp.ts index 60a6b8e3..a8c44a69 100644 --- a/assets/script/game/hero/HartModelComp.ts +++ b/assets/script/game/hero/HartModelComp.ts @@ -2,19 +2,38 @@ import { oops } from "db://oops-framework/core/Oops"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { HeroViewComp } from "./HeroViewComp"; import { GameEvent } from "../common/config/GameEvent"; +import { CCComp } from "db://oops-framework/module/common/CCComp"; +import { MissionEvent } from "../common/config/MissionEvent"; +import { SkillConComp } from "./SkillConComp"; +import { SkillSet } from "../common/config/SkillSet"; +import { _decorator } from "cc"; +const { ccclass, property } = _decorator; /** * 角色属性数据 */ -@ecs.register('HartModel') -export class HartModelComp extends ecs.Comp { +@ccclass('HartMode') +@ecs.register('HartModelComp') +export class HartModelComp extends CCComp { + SkillCon:SkillConComp onLoad(){ console.log("HartModel加载",this) + this.on(GameEvent.FightReady,this.start,this) + this.on(GameEvent.CastHeroSkill,this.cast_skill,this) } start(){ - oops.message.dispatchEvent(GameEvent.FightReady,this) + this.SkillCon=this.node.getComponent(SkillConComp) + console.log("hart start",this.SkillCon) } + + cast_skill(e:string,uuid:any){ + console.log("hart cast_skill",uuid ,e) + const config = SkillSet[uuid]; + this.SkillCon.castSkill(config) + } + reset() { } + } diff --git a/assets/script/game/hero/HeroInfoComp.ts b/assets/script/game/hero/HeroInfoComp.ts index 7172be87..f9f9b214 100644 --- a/assets/script/game/hero/HeroInfoComp.ts +++ b/assets/script/game/hero/HeroInfoComp.ts @@ -5,7 +5,6 @@ import { smc } from "../common/SingletonModuleComp"; import { HeroModelComp } from "./HeroModelComp"; import { HeroViewComp } from "./HeroViewComp"; import { HeroInfo, HeroPos, HeroSet } from "../common/config/heroSet"; -import { MissionComp } from "../map/MissionComp"; const { ccclass, property } = _decorator; diff --git a/assets/script/game/hero/SkillConComp.ts b/assets/script/game/hero/SkillConComp.ts index 242aa9fa..b107ea73 100644 --- a/assets/script/game/hero/SkillConComp.ts +++ b/assets/script/game/hero/SkillConComp.ts @@ -21,9 +21,13 @@ export class SkillConComp extends CCComp { init(): void { oops.message.on(GameEvent.FightEnd, this.clear_timer, this); } - start() { - // console.log("SkillConComp start") + onLoad(){ this.HeroView=this.node.getComponent(HeroViewComp) + console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad") + } + start() { + this.HeroView=this.node.getComponent(HeroViewComp) + console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start") this.HeroEntity=this.HeroView.ent } @@ -32,21 +36,21 @@ export class SkillConComp extends CCComp { if (this.HeroView.is_atking &&this.HeroView.at > this.HeroView.cd) { const config = SkillSet[this.HeroView.atk_skill]; if (!config) return; - this.castSkill(this.HeroView, this.HeroView.atk_skill, config); + this.castSkill(config); this.HeroView.at = 0; } } /** 施放技能 */ - private castSkill(view: HeroViewComp, skillId: number, config: typeof SkillSet[keyof typeof SkillSet]) { + castSkill(config: typeof SkillSet[keyof typeof SkillSet]) { // console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid); if (config.TargetGroup === TargetGroup.Enemy) { - view.playSkillEffect(config.uuid); - this.doSkill(view,config); + this.HeroView.playSkillEffect(config.uuid); + this.doSkill(config); } if (config.TargetGroup === TargetGroup.Ally) { - const targets = this.selectAllyTargets(view, config); + const targets = this.selectAllyTargets( config); if (targets.length === 0) return; } @@ -55,24 +59,24 @@ export class SkillConComp extends CCComp { } } - private doSkill(view: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]) { + private doSkill(config: typeof SkillSet[keyof typeof SkillSet]) { const skillEntity = ecs.getEntity(Skill); - const targets = this.selectEnemyTargets(view, config); + const targets = this.selectEnemyTargets(config); if (targets.length === 0) return; skillEntity.load( - new Vec3(view.node.position.x, view.node.position.y+BoxSet.ATK_Y, 0), // 起始位置 - view.box_group, // 阵营 - view.node.parent, // 父节点 + new Vec3(this.HeroView.node.position.x, this.HeroView.node.position.y+BoxSet.ATK_Y, 0), // 起始位置 + this.HeroView.box_group, // 阵营 + this.node.parent, // 父节点 config.uuid, // 技能ID new Vec3(targets[0]?.get(HeroViewComp).node.position.x, targets[0]?.get(HeroViewComp).node.position.y, 0), // 目标位置 - view + this.HeroView ); // console.log("技能:"+config.uuid+"=>"+targets[0]?.get(HeroViewComp).hero_name); } - private selectEnemyTargets(View: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { - const team = View.fac; + private selectEnemyTargets(config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { + const team = this.HeroView.fac; const isEnemyTeam = team === 0 ? 1 : 0; const candidates= ecs.query(ecs.allOf(HeroViewComp)).filter(e => e.get(HeroViewComp).fac !== team); return this.filterFrontRow(candidates, isEnemyTeam); @@ -89,8 +93,8 @@ export class SkillConComp extends CCComp { Math.abs(e.get(HeroViewComp).node.position.x - keyPos) < 10 ); } - private selectAllyTargets(View: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { - const team = View.fac; + private selectAllyTargets( config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { + const team = this.HeroView.fac; const candidates= ecs.query(ecs.allOf(HeroViewComp)).filter(e => e.get(HeroViewComp).fac === team); // 第二阶段:位置/血量等精细筛选 switch(config.TargetType) { diff --git a/assets/script/game/map/EquipsComp.ts b/assets/script/game/map/EquipsComp.ts index 0442ee18..788935c3 100644 --- a/assets/script/game/map/EquipsComp.ts +++ b/assets/script/game/map/EquipsComp.ts @@ -3,6 +3,9 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { GameEvent } from "../common/config/GameEvent"; import { SkillSet } from "../common/config/SkillSet"; +import { smc } from "../common/SingletonModuleComp"; +import { oops } from "db://oops-framework/core/Oops"; +import { MissionEvent } from "../common/config/MissionEvent"; const { ccclass, property } = _decorator; @@ -90,6 +93,7 @@ export class EquipsCompComp extends CCComp { this.boxs.getChildByName("ring").getChildByName("icon").active=false } update(dt: number): void { + if(!smc.mission.play||smc.mission.pause) return if(this.skill1.uuid!=0){ if(this.skill1.cd_time>0){ this.skill1.cd_time-=dt @@ -189,7 +193,7 @@ export class EquipsCompComp extends CCComp { } do_skill(uuid:number){ console.log("出发技能:",uuid) - + oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid) } get_skill(e:GameEvent,data:any){ console.log("get_skill") diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 773626e2..d324120b 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -10,14 +10,14 @@ import { CardControllerComp } from "./CardController"; import { GameEvent } from "../common/config/GameEvent"; import { HeroViewComp } from "../hero/HeroViewComp"; import { Hero } from "../hero/Hero"; -import { HartModelComp } from "../hero/HartModelComp"; import { TimerManager } from "db://oops-framework/core/common/timer/TimerManager"; import { HeroList } from "../common/config/heroSet"; const { ccclass, property } = _decorator; /** 视图层对象 */ + @ccclass('MissionComp') -@ecs.register('Mission', false) +@ecs.register('MissionComp', false) export class MissionComp extends CCComp { VictoryComp:any = null; reward:number = 0; diff --git a/assets/script/game/map/MissionHomeComp.ts b/assets/script/game/map/MissionHomeComp.ts index ccdc4e92..399d96ca 100644 --- a/assets/script/game/map/MissionHomeComp.ts +++ b/assets/script/game/map/MissionHomeComp.ts @@ -4,7 +4,6 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { smc } from "../common/SingletonModuleComp"; import { GameEvent } from "../common/config/GameEvent"; -import { MissionComp } from "./MissionComp"; const { ccclass, property } = _decorator; diff --git a/assets/script/game/map/VictoryComp.ts b/assets/script/game/map/VictoryComp.ts index 8245e613..6c0a66b5 100644 --- a/assets/script/game/map/VictoryComp.ts +++ b/assets/script/game/map/VictoryComp.ts @@ -12,7 +12,6 @@ import { UIID } from "../common/config/GameUIConfig"; import { PopViewParams, UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines"; import { RewardComp} from "./RewardComp"; import { HChipComp } from "../hero/HChipComp"; -import { MissionComp } from "./MissionComp"; import { GameEvent } from "../common/config/GameEvent"; const { ccclass, property } = _decorator;