feat: 添加战斗结算奖励系统

1.  新增结算奖励配置常量,定义金币、天赋经验、英雄碎片的发放规则与胜利加成系数
2.  新增RewardItemComp通用奖励条目组件,实现数量展示与弹跳入场动画
3.  为VictoryComp添加结算奖励逻辑:计算发放奖励、渲染奖励UI并添加入场动画效果
4.  新增金币、天赋经验奖励预制体并配置到结算弹窗中
5.  调整ui3.plist的图片边框参数适配新奖励图标
This commit is contained in:
pan
2026-09-01 10:18:55 +08:00
parent 89cc7e25b2
commit f40ff033c2
13 changed files with 3492 additions and 2300 deletions

View File

@@ -44,25 +44,28 @@
},
{
"__id__": 150
},
{
"__id__": 168
}
],
"_active": true,
"_components": [
{
"__id__": 168
"__id__": 198
},
{
"__id__": 170
"__id__": 200
},
{
"__id__": 172
"__id__": 202
},
{
"__id__": 174
"__id__": 204
}
],
"_prefab": {
"__id__": 176
"__id__": 206
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -3868,6 +3871,481 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Rewards",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 169
},
{
"__id__": 177
},
{
"__id__": 185
}
],
"_active": true,
"_components": [
{
"__id__": 193
},
{
"__id__": 195
}
],
"_prefab": {
"__id__": 197
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -227.118,
"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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 168
},
"_prefab": {
"__id__": 170
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 169
},
"asset": {
"__uuid__": "f802de61-c1b5-4575-ab88-2e6fc4e15e5c",
"__expectedType__": "cc.Prefab"
},
"fileId": "10z6GxEehAebPrefUJTgkq",
"instance": {
"__id__": 171
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "b5AF11DKdNponYuZ5McsDz",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 172
},
{
"__id__": 174
},
{
"__id__": 175
},
{
"__id__": 176
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 173
},
"propertyPath": [
"_name"
],
"value": "reward_item_gold"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"10z6GxEehAebPrefUJTgkq"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 173
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": -90,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 173
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 173
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 168
},
"_prefab": {
"__id__": 178
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 177
},
"asset": {
"__uuid__": "db18158c-588a-49ea-a224-cace29d5c912",
"__expectedType__": "cc.Prefab"
},
"fileId": "47Sc4S8E5EfJ3uZtG97byB",
"instance": {
"__id__": 179
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "25MhRHMVhGS7j//M5snvkH",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 180
},
{
"__id__": 182
},
{
"__id__": 183
},
{
"__id__": 184
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 181
},
"propertyPath": [
"_name"
],
"value": "reward_item_exp"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"47Sc4S8E5EfJ3uZtG97byB"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 181
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 181
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 181
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 168
},
"_prefab": {
"__id__": 186
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 185
},
"asset": {
"__uuid__": "4b8fb686-b649-4525-9aae-df0e7369205b",
"__expectedType__": "cc.Prefab"
},
"fileId": "24rlgXRJ9AHLGpMW+aYyEx",
"instance": {
"__id__": 187
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "d2BEWXbMlGFIsn1hlQMVR9",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 188
},
{
"__id__": 190
},
{
"__id__": 191
},
{
"__id__": 192
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 189
},
"propertyPath": [
"_name"
],
"value": "clips"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"24rlgXRJ9AHLGpMW+aYyEx"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 189
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 90,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 189
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 189
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 168
},
"_enabled": true,
"__prefab": {
"__id__": 194
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7dsZEiP41NhL4M2/NjpZCI"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 168
},
"_enabled": true,
"__prefab": {
"__id__": 196
},
"_resizeMode": 1,
"_layoutType": 1,
"_cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_startAxis": 0,
"_paddingLeft": 0,
"_paddingRight": 0,
"_paddingTop": 0,
"_paddingBottom": 0,
"_spacingX": 20,
"_spacingY": 0,
"_verticalDirection": 1,
"_horizontalDirection": 0,
"_constraint": 0,
"_constraintNum": 2,
"_affectedByScale": false,
"_isAlign": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b9EzIUlHpPlpvFLBGZOkY3"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e84cB5sbVA+JkeMVQTgwOQ",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -3878,7 +4356,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 169
"__id__": 199
},
"_contentSize": {
"__type__": "cc.Size",
@@ -3906,7 +4384,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 171
"__id__": 201
},
"rank_icon": {
"__id__": 106
@@ -3932,6 +4410,21 @@
"__uuid__": "12df63de-cda7-4be2-8e23-ea387fbba6f5",
"__expectedType__": "cc.Prefab"
},
"rewards_container": {
"__id__": 168
},
"clip_prefab": {
"__uuid__": "4b8fb686-b649-4525-9aae-df0e7369205b",
"__expectedType__": "cc.Prefab"
},
"reward_gold_prefab": {
"__uuid__": "f802de61-c1b5-4575-ab88-2e6fc4e15e5c",
"__expectedType__": "cc.Prefab"
},
"reward_exp_prefab": {
"__uuid__": "db18158c-588a-49ea-a224-cace29d5c912",
"__expectedType__": "cc.Prefab"
},
"_id": ""
},
{
@@ -3948,7 +4441,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 173
"__id__": 203
},
"_alignFlags": 45,
"_target": null,
@@ -3984,7 +4477,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 175
"__id__": 205
},
"_id": ""
},
@@ -4004,6 +4497,15 @@
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 185
},
{
"__id__": 177
},
{
"__id__": 169
},
{
"__id__": 77
}