feat(equip-system): 新增装备系统核心支持
1. 重构卡牌配置定义,明确Field类型为装备卡并支持单卡多词条 2. 添加装备卡判断和词条计数工具函数 3. 新增EquipListComp装备列表组件 4. 更新aui.plist和预制体UI资源适配新装备系统 5. 补充多词条装备示例配置
This commit is contained in:
@@ -2554,10 +2554,10 @@
|
|||||||
"height": 81,
|
"height": 81,
|
||||||
"rawWidth": 185,
|
"rawWidth": 185,
|
||||||
"rawHeight": 81,
|
"rawHeight": 81,
|
||||||
"borderTop": 0,
|
"borderTop": 40,
|
||||||
"borderBottom": 0,
|
"borderBottom": 40,
|
||||||
"borderLeft": 92,
|
"borderLeft": 30,
|
||||||
"borderRight": 92,
|
"borderRight": 30,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"pixelsToUnit": 100,
|
"pixelsToUnit": 100,
|
||||||
"pivotX": 0.5,
|
"pivotX": 0.5,
|
||||||
@@ -2693,9 +2693,9 @@
|
|||||||
"rawWidth": 185,
|
"rawWidth": 185,
|
||||||
"rawHeight": 81,
|
"rawHeight": 81,
|
||||||
"borderTop": 40,
|
"borderTop": 40,
|
||||||
"borderBottom": 35,
|
"borderBottom": 40,
|
||||||
"borderLeft": 92,
|
"borderLeft": 30,
|
||||||
"borderRight": 92,
|
"borderRight": 30,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"pixelsToUnit": 100,
|
"pixelsToUnit": 100,
|
||||||
"pivotX": 0.5,
|
"pivotX": 0.5,
|
||||||
@@ -2738,10 +2738,10 @@
|
|||||||
"height": 81,
|
"height": 81,
|
||||||
"rawWidth": 185,
|
"rawWidth": 185,
|
||||||
"rawHeight": 81,
|
"rawHeight": 81,
|
||||||
"borderTop": 0,
|
"borderTop": 40,
|
||||||
"borderBottom": 0,
|
"borderBottom": 40,
|
||||||
"borderLeft": 92,
|
"borderLeft": 30,
|
||||||
"borderRight": 92,
|
"borderRight": 30,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"pixelsToUnit": 100,
|
"pixelsToUnit": 100,
|
||||||
"pivotX": 0.5,
|
"pivotX": 0.5,
|
||||||
|
|||||||
2745
assets/resources/gui/element/equip.prefab
Normal file
2745
assets/resources/gui/element/equip.prefab
Normal file
File diff suppressed because it is too large
Load Diff
13
assets/resources/gui/element/equip.prefab.meta
Normal file
13
assets/resources/gui/element/equip.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.50",
|
||||||
|
"importer": "prefab",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "f30f91b1-3100-4d9e-befb-cdde5f86e6f8",
|
||||||
|
"files": [
|
||||||
|
".json"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"syncNodeName": "equip"
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -40,20 +40,23 @@
|
|||||||
"__id__": 132
|
"__id__": 132
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 140
|
"__id__": 138
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 146
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 146
|
"__id__": 152
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 148
|
"__id__": 154
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 150
|
"__id__": 156
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -427,9 +430,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 51,
|
"r": 158,
|
||||||
"g": 51,
|
"g": 255,
|
||||||
"b": 51,
|
"b": 134,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -520,7 +523,7 @@
|
|||||||
"__id__": 20
|
"__id__": 20
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 28
|
"__id__": 28
|
||||||
@@ -631,8 +634,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 218,
|
"width": 168,
|
||||||
"height": 218
|
"height": 168
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -753,8 +756,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 420,
|
"width": 320,
|
||||||
"height": 420
|
"height": 320
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -784,9 +787,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 51,
|
"r": 92,
|
||||||
"g": 51,
|
"g": 185,
|
||||||
"b": 51,
|
"b": 247,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -877,7 +880,7 @@
|
|||||||
"__id__": 36
|
"__id__": 36
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 44
|
"__id__": 44
|
||||||
@@ -988,8 +991,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 235,
|
"width": 168,
|
||||||
"height": 235
|
"height": 168
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1113,8 +1116,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 470,
|
"width": 320,
|
||||||
"height": 470
|
"height": 320
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1144,9 +1147,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 51,
|
"r": 228,
|
||||||
"g": 51,
|
"g": 194,
|
||||||
"b": 51,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1237,7 +1240,7 @@
|
|||||||
"__id__": 52
|
"__id__": 52
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 60
|
"__id__": 60
|
||||||
@@ -1348,8 +1351,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 235,
|
"width": 168,
|
||||||
"height": 235
|
"height": 168
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1473,8 +1476,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 470,
|
"width": 320,
|
||||||
"height": 470
|
"height": 320
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1504,9 +1507,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 51,
|
"r": 255,
|
||||||
"g": 51,
|
"g": 179,
|
||||||
"b": 51,
|
"b": 179,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1597,7 +1600,7 @@
|
|||||||
"__id__": 68
|
"__id__": 68
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 76
|
"__id__": 76
|
||||||
@@ -1708,8 +1711,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 235,
|
"width": 168,
|
||||||
"height": 235
|
"height": 168
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1833,8 +1836,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 470,
|
"width": 320,
|
||||||
"height": 470
|
"height": 320
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1864,9 +1867,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 51,
|
"r": 255,
|
||||||
"g": 51,
|
"g": 246,
|
||||||
"b": 51,
|
"b": 139,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -2858,7 +2861,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
"_name": "icon",
|
"_name": "ItemFrame00~03_BgGlow",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_parent": {
|
"_parent": {
|
||||||
@@ -2890,6 +2893,142 @@
|
|||||||
"z": 0,
|
"z": 0,
|
||||||
"w": 1
|
"w": 1
|
||||||
},
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5,
|
||||||
|
"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__": 126
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 128
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 133,
|
||||||
|
"height": 133
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "104MEwfepJOojH2VuLhJOd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Sprite",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 126
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 130
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_spriteFrame": {
|
||||||
|
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@e217d",
|
||||||
|
"__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": "8eUcY/ZzxGerlWs7mB2pN3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "1aXiaxY2xGibmv+6AL2LT7",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "icon",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 133
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 135
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 137
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
"_lscale": {
|
"_lscale": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0.6,
|
"x": 0.6,
|
||||||
@@ -2912,11 +3051,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 126
|
"__id__": 132
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 128
|
"__id__": 134
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -2940,11 +3079,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 126
|
"__id__": 132
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 130
|
"__id__": 136
|
||||||
},
|
},
|
||||||
"_customMaterial": null,
|
"_customMaterial": null,
|
||||||
"_srcBlendFactor": 2,
|
"_srcBlendFactor": 2,
|
||||||
@@ -3004,20 +3143,20 @@
|
|||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 133
|
"__id__": 139
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 135
|
"__id__": 141
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 137
|
"__id__": 143
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 139
|
"__id__": 145
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -3054,11 +3193,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 132
|
"__id__": 138
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 134
|
"__id__": 140
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -3082,11 +3221,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 132
|
"__id__": 138
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 136
|
"__id__": 142
|
||||||
},
|
},
|
||||||
"_customMaterial": null,
|
"_customMaterial": null,
|
||||||
"_srcBlendFactor": 2,
|
"_srcBlendFactor": 2,
|
||||||
@@ -3130,11 +3269,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 132
|
"__id__": 138
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 138
|
"__id__": 144
|
||||||
},
|
},
|
||||||
"_alignFlags": 45,
|
"_alignFlags": 45,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
@@ -3185,14 +3324,14 @@
|
|||||||
"_active": false,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 141
|
"__id__": 147
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 143
|
"__id__": 149
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 145
|
"__id__": 151
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -3229,11 +3368,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 140
|
"__id__": 146
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 142
|
"__id__": 148
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -3257,11 +3396,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 140
|
"__id__": 146
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 144
|
"__id__": 150
|
||||||
},
|
},
|
||||||
"_customMaterial": null,
|
"_customMaterial": null,
|
||||||
"_srcBlendFactor": 2,
|
"_srcBlendFactor": 2,
|
||||||
@@ -3342,7 +3481,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 147
|
"__id__": 153
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -3370,17 +3509,17 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 149
|
"__id__": 155
|
||||||
},
|
},
|
||||||
"icon_node": {
|
"icon_node": {
|
||||||
"__id__": 126
|
"__id__": 132
|
||||||
},
|
},
|
||||||
"bg_node": {
|
"bg_node": {
|
||||||
"__id__": 2
|
"__id__": 2
|
||||||
},
|
},
|
||||||
"info_label": null,
|
"info_label": null,
|
||||||
"cd_mask": {
|
"cd_mask": {
|
||||||
"__id__": 132
|
"__id__": 138
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.4 MiB |
@@ -55,7 +55,7 @@ export enum CardSkillType {
|
|||||||
export enum CardTriggerType {
|
export enum CardTriggerType {
|
||||||
Instant = 1, // 即时触发:使用后立即生效一次
|
Instant = 1, // 即时触发:使用后立即生效一次
|
||||||
Interval = 2, // 定时循环:战斗中按 t_inv 间隔重复触发
|
Interval = 2, // 定时循环:战斗中按 t_inv 间隔重复触发
|
||||||
Field = 3, // 驻场光环:被动生效(仅显式分类,仍由 field 字段驱动)
|
Field = 3, // 驻场光环(俗称「装备」):被动生效,由 field 数组驱动,支持单卡多词条
|
||||||
FightStart = 4, // 战斗开始时触发
|
FightStart = 4, // 战斗开始时触发
|
||||||
FightEnd = 5, // 战斗结束时触发(每波结束)
|
FightEnd = 5, // 战斗结束时触发(每波结束)
|
||||||
HeroDead = 6, // 场上己方英雄死亡时触发
|
HeroDead = 6, // 场上己方英雄死亡时触发
|
||||||
@@ -98,7 +98,7 @@ export interface CardConfig {
|
|||||||
t_inv?: number // 触发间隔(秒)
|
t_inv?: number // 触发间隔(秒)
|
||||||
keep_waves?: number // 维持的波次数(-1表示持续到战斗结束,0或undefined表示仅本波次)
|
keep_waves?: number // 维持的波次数(-1表示持续到战斗结束,0或undefined表示仅本波次)
|
||||||
overrides?: SkillOverrides // 技能参数覆写(如自定义伤害ap、buff值、金币数等)
|
overrides?: SkillOverrides // 技能参数覆写(如自定义伤害ap、buff值、金币数等)
|
||||||
field?: number[] // 驻场技能 UUID 数组,表示该卡牌提供驻场属性加成
|
field?: number[] // 装备词条数组:驻场光环卡(trigger_type=Field)的属性词条,支持单卡多词条(如 [7002, 7004, 7005] 同时提供攻击/暴击/暴伤)
|
||||||
|
|
||||||
/** 触发类型(必填,技能卡专用;功能卡/英雄卡可缺省) */
|
/** 触发类型(必填,技能卡专用;功能卡/英雄卡可缺省) */
|
||||||
trigger_type?: CardTriggerType;
|
trigger_type?: CardTriggerType;
|
||||||
@@ -180,6 +180,8 @@ const SkillCardData: any[] = [
|
|||||||
|
|
||||||
{ uuid: 8710, skill: 0, wave: SKILL_CARD_WAVES[0], name: "金币收益", info: "每回合金币收益+1", is_inst: false, keep_waves: -1, field: [7010], trigger_type: CardTriggerType.Field },
|
{ uuid: 8710, skill: 0, wave: SKILL_CARD_WAVES[0], name: "金币收益", info: "每回合金币收益+1", is_inst: false, keep_waves: -1, field: [7010], trigger_type: CardTriggerType.Field },
|
||||||
{ uuid: 8711, skill: 0, wave: SKILL_CARD_WAVES[0], name: "出售强化", info: "卖出英雄金币+1", is_inst: false, keep_waves: -1, field: [7011], trigger_type: CardTriggerType.Field },
|
{ uuid: 8711, skill: 0, wave: SKILL_CARD_WAVES[0], name: "出售强化", info: "卖出英雄金币+1", is_inst: false, keep_waves: -1, field: [7011], trigger_type: CardTriggerType.Field },
|
||||||
|
// --- 多词条装备示例(一张卡自带多条属性词条) ---
|
||||||
|
{ uuid: 8720, skill: 0, wave: SKILL_CARD_WAVES[0], name: "勇者护符", info: "英雄攻击力+10%, 暴击率+10%, 暴击伤害+20%", is_inst: false, keep_waves: -1, field: [7002, 7004, 7005], trigger_type: CardTriggerType.Field },
|
||||||
|
|
||||||
// ==================== wave 5 档(强度 ×2) ====================
|
// ==================== wave 5 档(强度 ×2) ====================
|
||||||
// --- 驻场卡(field uuid +200,对应 FieldSkillSet 72xx 段) ---
|
// --- 驻场卡(field uuid +200,对应 FieldSkillSet 72xx 段) ---
|
||||||
@@ -204,6 +206,8 @@ const SkillCardData: any[] = [
|
|||||||
{ uuid: 8760, skill: 0, wave: SKILL_CARD_WAVES[1], name: "金币收益+", info: "每回合金币收益+2", is_inst: false, keep_waves: -1, field: [7210], trigger_type: CardTriggerType.Field },
|
{ uuid: 8760, skill: 0, wave: SKILL_CARD_WAVES[1], name: "金币收益+", info: "每回合金币收益+2", is_inst: false, keep_waves: -1, field: [7210], trigger_type: CardTriggerType.Field },
|
||||||
{ uuid: 8761, skill: 0, wave: SKILL_CARD_WAVES[1], name: "购买优惠+", info: "购买卡牌费用-2金币", is_inst: false, keep_waves: -1, field: [7212], trigger_type: CardTriggerType.Field },
|
{ uuid: 8761, skill: 0, wave: SKILL_CARD_WAVES[1], name: "购买优惠+", info: "购买卡牌费用-2金币", is_inst: false, keep_waves: -1, field: [7212], trigger_type: CardTriggerType.Field },
|
||||||
{ uuid: 8762, skill: 0, wave: SKILL_CARD_WAVES[1], name: "刷新优惠", info: "刷新卡牌费用-1金币", is_inst: false, keep_waves: -1, field: [7213], trigger_type: CardTriggerType.Field },
|
{ uuid: 8762, skill: 0, wave: SKILL_CARD_WAVES[1], name: "刷新优惠", info: "刷新卡牌费用-1金币", is_inst: false, keep_waves: -1, field: [7213], trigger_type: CardTriggerType.Field },
|
||||||
|
// --- 多词条装备示例(一张卡自带多条属性词条) ---
|
||||||
|
{ uuid: 8770, skill: 0, wave: SKILL_CARD_WAVES[1], name: "守卫护甲", info: "英雄最大生命+20%, 战后生命回复+20%, 攻速+20%", is_inst: false, keep_waves: -1, field: [7207, 7201, 7206], trigger_type: CardTriggerType.Field },
|
||||||
|
|
||||||
|
|
||||||
// ==================== wave 8 档(强度 ×3) ====================
|
// ==================== wave 8 档(强度 ×3) ====================
|
||||||
@@ -234,6 +238,8 @@ const SkillCardData: any[] = [
|
|||||||
{ uuid: 8814, skill: 0, wave: SKILL_CARD_WAVES[2], name: "结束强化++", info: "战斗结束触发技能次数+1", is_inst: false, keep_waves: -1, field: [7017], trigger_type: CardTriggerType.Field },
|
{ uuid: 8814, skill: 0, wave: SKILL_CARD_WAVES[2], name: "结束强化++", info: "战斗结束触发技能次数+1", is_inst: false, keep_waves: -1, field: [7017], trigger_type: CardTriggerType.Field },
|
||||||
{ uuid: 8815, skill: 0, wave: SKILL_CARD_WAVES[2], name: "攻击强化++", info: "攻击触发技能次数+1", is_inst: false, keep_waves: -1, field: [7018], trigger_type: CardTriggerType.Field },
|
{ uuid: 8815, skill: 0, wave: SKILL_CARD_WAVES[2], name: "攻击强化++", info: "攻击触发技能次数+1", is_inst: false, keep_waves: -1, field: [7018], trigger_type: CardTriggerType.Field },
|
||||||
{ uuid: 8816, skill: 0, wave: SKILL_CARD_WAVES[2], name: "受击强化++", info: "被攻击触发技能次数+1", is_inst: false, keep_waves: -1, field: [7019], trigger_type: CardTriggerType.Field },
|
{ uuid: 8816, skill: 0, wave: SKILL_CARD_WAVES[2], name: "受击强化++", info: "被攻击触发技能次数+1", is_inst: false, keep_waves: -1, field: [7019], trigger_type: CardTriggerType.Field },
|
||||||
|
// --- 多词条装备示例(一张卡自带多条属性词条) ---
|
||||||
|
{ uuid: 8820, skill: 0, wave: SKILL_CARD_WAVES[2], name: "神圣之刃", info: "英雄攻击力+30%, 暴击率+30%, 暴击伤害+60%, 攻速+30%", is_inst: false, keep_waves: -1, field: [7402, 7404, 7405, 7406], trigger_type: CardTriggerType.Field },
|
||||||
// --- 范围攻击卡(ap 最高,间隔最短) ---
|
// --- 范围攻击卡(ap 最高,间隔最短) ---
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -322,6 +328,28 @@ const clampCardLv = (lv: number): CardLV => {
|
|||||||
return CardLV.LV1;
|
return CardLV.LV1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ============ 装备(光环类技能卡)语义化封装 ============
|
||||||
|
// 说明:不新增 CardType / CKind,以 trigger_type=Field 且 field 非空作为装备识别标志,
|
||||||
|
// 复用现有 CardConfig.field: number[] 天然支持单卡多词条(一张装备自带多条属性加成)。
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断卡牌是否为「装备」(光环类技能卡)。
|
||||||
|
* 判定条件:trigger_type 为 Field,且 field 数组非空。
|
||||||
|
*/
|
||||||
|
export const isEquipmentCard = (card: CardConfig): boolean => {
|
||||||
|
return card.trigger_type === CardTriggerType.Field
|
||||||
|
&& !!card.field
|
||||||
|
&& card.field.length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取装备卡的属性词条数量。
|
||||||
|
* 非装备卡返回 0;装备卡返回 field 数组长度。
|
||||||
|
*/
|
||||||
|
export const getEquipmentFieldCount = (card: CardConfig): number => {
|
||||||
|
return isEquipmentCard(card) ? (card.field?.length ?? 0) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/** 单次按权重抽取一张卡 */
|
/** 单次按权重抽取一张卡 */
|
||||||
const weightedPick = (cards: CardConfig[]): CardConfig | null => {
|
const weightedPick = (cards: CardConfig[]): CardConfig | null => {
|
||||||
if (cards.length === 0) return null
|
if (cards.length === 0) return null
|
||||||
|
|||||||
153
assets/script/game/map/EquipListComp.ts
Normal file
153
assets/script/game/map/EquipListComp.ts
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
/**
|
||||||
|
* @file EquipListComp.ts
|
||||||
|
* @description 单个技能卡效果控制组件(UI 视图层 + 逻辑层)
|
||||||
|
*
|
||||||
|
* 职责:
|
||||||
|
* 1. 表示一张已使用的技能卡在战场上的 **可视化实体**。
|
||||||
|
* 2. 按 trigger_type 类型化分发触发逻辑(即时 / 定时 / 驻场 / 事件型)。
|
||||||
|
* 3. 显示技能图标和剩余触发次数。
|
||||||
|
* 4. 触发结束后自动销毁。
|
||||||
|
*
|
||||||
|
* 触发类型(CardTriggerType):
|
||||||
|
* - Instant (1):init 时立即触发一次(按 t_times 控制次数,跨波次 NewWave 时再次触发)
|
||||||
|
* - Interval (2):监听 FightStart → update 帧驱动按 t_inv 间隔重复触发(按 t_times 控制每波次数)
|
||||||
|
* - Field (3):被动生效,不主动施法(实际由 FieldSkillSet 处理)
|
||||||
|
* - FightStart (4):监听 FightStart 事件,按 trigger_limit 全局累计上限
|
||||||
|
* - FightEnd (5):监听 FightEnd 事件(每波结束派发),按 trigger_limit 全局累计上限
|
||||||
|
* - HeroDead (6):监听 HeroDead 事件(仅英雄阵营派发,怪物死亡不触发)
|
||||||
|
* - HeroCall (7):监听 MasterCalled(主角/技能召唤)+ ReviveSuccess(复活)
|
||||||
|
*
|
||||||
|
* 关键设计:
|
||||||
|
* - 事件型(4-7)统一走 onEventTrigger 入口,仅作触发信号,不读取 payload
|
||||||
|
* - 触发上限:Instant/Interval 按 t_times(每波内),事件型按 trigger_limit(全局)
|
||||||
|
* - 跨波次:keep_waves 控制存活;事件型 trigger_count 不随波次重置
|
||||||
|
* - 销毁时通过 GameEvent.RemoveSkillBox 通知 MissSkillsComp 回收槽位
|
||||||
|
*
|
||||||
|
* 依赖:
|
||||||
|
* - CardPoolList / CardTriggerType(CardSet)—— 查询技能卡的触发配置
|
||||||
|
* - SkillSet —— 技能静态配置(icon 字段)
|
||||||
|
* - GameEvent —— 各类游戏事件
|
||||||
|
* - smc.mission —— 游戏运行状态
|
||||||
|
*/
|
||||||
|
import { mLogger } from "../common/Logger";
|
||||||
|
import { _decorator, Node, Prefab, Sprite, Label, Vec3, resources, SpriteAtlas, tween, v3, Tween, NodeEventType } from "cc";
|
||||||
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
|
import { CardPoolList, CardTriggerType } from "../common/config/CardSet";
|
||||||
|
import { SkillSet, SkillOverrides, FieldSkillSet } from "../common/config/SkillSet";
|
||||||
|
import { oops } from "db://oops-framework/core/Oops";
|
||||||
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
|
import { UIID } from "../common/config/GameUIConfig";
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EquipListComp —— 单个技能卡效果视图 + 逻辑组件
|
||||||
|
*
|
||||||
|
* 由 MissSkillsComp.addSkill() 实例化并初始化。
|
||||||
|
* 在战场上以图标 + 剩余次数的形式呈现。
|
||||||
|
*/
|
||||||
|
@ccclass('EquipListComp')
|
||||||
|
@ecs.register('EquipListComp', false)
|
||||||
|
export class EquipListComp extends CCComp {
|
||||||
|
/** 调试日志开关 */
|
||||||
|
private debugMode: boolean = true;
|
||||||
|
/** 装备图标节点 */
|
||||||
|
@property({ type: Node })
|
||||||
|
private icon_node: Node = null;
|
||||||
|
|
||||||
|
@property({ type: Node })
|
||||||
|
private bg_node: Node = null;
|
||||||
|
|
||||||
|
@property(Label)
|
||||||
|
private name_label: Label = null;
|
||||||
|
|
||||||
|
@property(Label)
|
||||||
|
private fied1: Label = null;
|
||||||
|
@property(Label)
|
||||||
|
private fied2: Label = null;
|
||||||
|
@property(Label)
|
||||||
|
private fied3: Label = null;
|
||||||
|
|
||||||
|
@property(Label)
|
||||||
|
private level_label: Label = null;
|
||||||
|
|
||||||
|
@property({ type: Node })
|
||||||
|
private buy_node: Node = null;
|
||||||
|
// ======================== 技能配置 ========================
|
||||||
|
|
||||||
|
/** 技能 UUID */
|
||||||
|
private s_uuid: number = 0;
|
||||||
|
/** 卡牌等级 */
|
||||||
|
private card_lv: number = 1;
|
||||||
|
/** 是否为即时技能(true=使用后立即触发,false=战斗中定时触发) */
|
||||||
|
private is_instant: boolean = true;
|
||||||
|
/** 总触发次数 */
|
||||||
|
private trigger_times: number = 1;
|
||||||
|
/** 触发间隔(秒,仅持续技能有效) */
|
||||||
|
private trigger_interval: number = 0;
|
||||||
|
/** 维持的波次数(-1表示直到战斗结束,0表示不跨波次,>0表示维持的具体波次数) */
|
||||||
|
private keep_waves: number = 0;
|
||||||
|
/** 技能覆写参数(自定义伤害、Buff等) */
|
||||||
|
private overrides?: SkillOverrides;
|
||||||
|
/** 驻场技能 UUID 列表 */
|
||||||
|
public field: number[] = [];
|
||||||
|
/** 卡牌自定义图标ID(优先级最高,未定义则按 trigger_type 自动取) */
|
||||||
|
private card_icon?: string;
|
||||||
|
|
||||||
|
// ======================== 触发类型化扩展 ========================
|
||||||
|
|
||||||
|
/** 触发类型(默认即时,保持向后兼容) */
|
||||||
|
private trigger_type: CardTriggerType = CardTriggerType.Instant;
|
||||||
|
/** 事件型触发的全局次数上限(Infinity 表示无上限) */
|
||||||
|
private trigger_limit: number = Infinity;
|
||||||
|
/** 事件型已触发次数 */
|
||||||
|
private trigger_count: number = 0;
|
||||||
|
|
||||||
|
// ======================== 运行时状态 ========================
|
||||||
|
|
||||||
|
/** 已触发次数 */
|
||||||
|
private current_trigger_times: number = 0;
|
||||||
|
/** 当前计时器(秒) */
|
||||||
|
private timer: number = 0;
|
||||||
|
/** 是否处于战斗中(仅战斗中持续技能才计时) */
|
||||||
|
private in_combat: boolean = false;
|
||||||
|
/** 是否已初始化 */
|
||||||
|
private initialized: boolean = false;
|
||||||
|
|
||||||
|
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onDestroy() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
init() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private registerTrigger(): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
updateUI() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** ECS 组件移除时销毁节点 */
|
||||||
|
reset() {
|
||||||
|
if (this.node && this.node.isValid) {
|
||||||
|
this.node.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
assets/script/game/map/EquipListComp.ts.meta
Normal file
9
assets/script/game/map/EquipListComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.24",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "f0155d5e-713e-4c0f-a5d3-9c69f75af91b",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
@@ -105,6 +105,20 @@ export class MissionCardComp extends CCComp {
|
|||||||
/** 关闭英雄卡池按钮(仅负责收起 cards_node) */
|
/** 关闭英雄卡池按钮(仅负责收起 cards_node) */
|
||||||
@property(Node)
|
@property(Node)
|
||||||
closeHeros: Node = null!
|
closeHeros: Node = null!
|
||||||
|
/** 卡池升级按钮节点(已废弃,保留节点引用防止 editor 报错) */
|
||||||
|
/** 英雄卡牌池cards_node显示隐藏 */
|
||||||
|
@property(Node)
|
||||||
|
showEquips: Node = null!
|
||||||
|
/** 关闭英雄卡池按钮(仅负责收起 cards_node) */
|
||||||
|
@property(Node)
|
||||||
|
closeEquips: Node = null!
|
||||||
|
/** 卡池升级按钮节点(已废弃,保留节点引用防止 editor 报错) */
|
||||||
|
/** 英雄卡牌池cards_node显示隐藏 */
|
||||||
|
@property(Node)
|
||||||
|
showShop: Node = null!
|
||||||
|
/** 关闭英雄卡池按钮(仅负责收起 cards_node) */
|
||||||
|
@property(Node)
|
||||||
|
closeShop: Node = null!
|
||||||
/** 卡池升级按钮节点(已废弃,保留节点引用防止 editor 报错) */
|
/** 卡池升级按钮节点(已废弃,保留节点引用防止 editor 报错) */
|
||||||
@property(Node)
|
@property(Node)
|
||||||
cards_up: Node = null!
|
cards_up: Node = null!
|
||||||
|
|||||||
Reference in New Issue
Block a user