feat(天赋系统): 实现天赋选择功能并完善卡片交互逻辑

添加天赋选择事件触发机制,在战斗开始时触发天赋选择界面
重构MissionCardComp类,实现天赋卡片的随机生成、显示和选择功能
为卡片添加选中状态标记和交互处理
更新prefab资源以支持新的天赋选择界面
This commit is contained in:
walkpan
2026-01-04 19:03:00 +08:00
parent f7622202f8
commit 71026ae9a5
4 changed files with 2222 additions and 1651 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -38,19 +38,25 @@
},
{
"__id__": 56
},
{
"__id__": 64
}
],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 74
},
{
"__id__": 66
"__id__": 76
},
{
"__id__": 78
}
],
"_prefab": {
"__id__": 68
"__id__": 80
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1492,6 +1498,234 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "selected",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 65
}
],
"_active": true,
"_components": [
{
"__id__": 71
}
],
"_prefab": {
"__id__": 73
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "GreenTick",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 64
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
},
{
"__id__": 68
}
],
"_prefab": {
"__id__": 70
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -76.645,
"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.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 65
},
"_enabled": true,
"__prefab": {
"__id__": 67
},
"_contentSize": {
"__type__": "cc.Size",
"width": 54,
"height": 54
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f0xTeEhHVEmY81KJd5/ryK"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 65
},
"_enabled": true,
"__prefab": {
"__id__": 69
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@55373",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63qWzhuPFLV6vEcEmhLEAC"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e8g5MwfEhD6Y0m0e23zag4",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 64
},
"_enabled": true,
"__prefab": {
"__id__": 72
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "acA6HyWsxC3bepdLREshZ3"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "29hkGgh2lDpJ8GAA6r1xOh",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -1502,7 +1736,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 65
"__id__": 75
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1530,7 +1764,7 @@
},
"_enabled": false,
"__prefab": {
"__id__": 67
"__id__": 77
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1565,6 +1799,62 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "609hAwCWtPmqZXRsnP0C+8"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 79
},
"clickEvents": [],
"_interactable": true,
"_transition": 3,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "85rZYvTXxBq4pJCoHruVwe"
},
{
"__type__": "cc.PrefabInfo",
"root": {