feat: 完成天赋系统重做与UI界面优化
1. 新增天赋等级配置与经验升级逻辑,支持连升多级 2. 重构天赋UI界面,添加等级进度条与页签状态显示 3. 优化技能卡片UI,新增技能名称显示与等级格式调整 4. 调整英雄界面布局,修复UI错位问题 5. 新增页签背景预制件与天赋道具UI样式
This commit is contained in:
@@ -1397,7 +1397,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 70.97,
|
||||
"y": -2.252,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2228,8 +2228,8 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -127.514,
|
||||
"y": 262.93,
|
||||
"x": 0,
|
||||
"y": -132.818,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -3879,7 +3879,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 2.164,
|
||||
"y": 8.701999999999984,
|
||||
"y": -69.48000000000003,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -3938,7 +3938,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -325,
|
||||
"x": -225,
|
||||
"y": 29.950000000000003,
|
||||
"z": 0
|
||||
},
|
||||
@@ -4945,7 +4945,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -105,
|
||||
"x": -5,
|
||||
"y": 29.950000000000003,
|
||||
"z": 0
|
||||
},
|
||||
@@ -5952,8 +5952,8 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 115,
|
||||
"y": 29.950000000000003,
|
||||
"x": -225,
|
||||
"y": -29.950000000000003,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -6959,7 +6959,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -325,
|
||||
"x": -5,
|
||||
"y": -29.950000000000003,
|
||||
"z": 0
|
||||
},
|
||||
@@ -7947,7 +7947,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 650,
|
||||
"width": 450,
|
||||
"height": 109.9
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -7977,7 +7977,7 @@
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 371.348,
|
||||
"_top": 449.53000000000003,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
@@ -8085,7 +8085,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -166.442,
|
||||
"y": -218.836,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -8120,7 +8120,7 @@
|
||||
"__id__": 381
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 383
|
||||
@@ -8316,7 +8316,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 75.138,
|
||||
"y": -14.623999999999995,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -8386,8 +8386,8 @@
|
||||
"_target": null,
|
||||
"_left": 345,
|
||||
"_right": 345,
|
||||
"_top": 19.862000000000002,
|
||||
"_bottom": 170.138,
|
||||
"_top": 109.624,
|
||||
"_bottom": 80.376,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
@@ -8466,7 +8466,7 @@
|
||||
"__id__": 381
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 399
|
||||
@@ -8589,8 +8589,8 @@
|
||||
"_target": null,
|
||||
"_left": 30,
|
||||
"_right": 30,
|
||||
"_top": 501.442,
|
||||
"_bottom": 168.55800000000002,
|
||||
"_top": 553.836,
|
||||
"_bottom": 116.16400000000002,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
|
||||
@@ -40,23 +40,23 @@
|
||||
"__id__": 137
|
||||
},
|
||||
{
|
||||
"__id__": 143
|
||||
"__id__": 155
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 153
|
||||
"__id__": 171
|
||||
},
|
||||
{
|
||||
"__id__": 155
|
||||
"__id__": 173
|
||||
},
|
||||
{
|
||||
"__id__": 157
|
||||
"__id__": 175
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 159
|
||||
"__id__": 177
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -1921,7 +1921,7 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 132
|
||||
@@ -2056,23 +2056,80 @@
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 138
|
||||
},
|
||||
{
|
||||
"__id__": 140
|
||||
"__id__": 144
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 150
|
||||
},
|
||||
{
|
||||
"__id__": 152
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 142
|
||||
"__id__": 154
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 101.703,
|
||||
"y": 107.847,
|
||||
"x": 79.602,
|
||||
"y": 102.43,
|
||||
"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": "ResourceBar_Single_Btn_Blue1",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 137
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 139
|
||||
},
|
||||
{
|
||||
"__id__": 141
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 143
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2104,16 +2161,16 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 137
|
||||
"__id__": 138
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 139
|
||||
"__id__": 140
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 81,
|
||||
"height": 85
|
||||
"width": 60,
|
||||
"height": 62
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -2124,7 +2181,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2cBRMszR5Gya6b3iMZCaWj"
|
||||
"fileId": "34TYnQZu9AbJMD1KxyB0rV"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -2132,24 +2189,24 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 137
|
||||
"__id__": 138
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 141
|
||||
"__id__": 142
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"r": 41,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@96977",
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@f0800",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
@@ -2164,12 +2221,15 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_atlas": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b1ycugg2FKdoKccP5eYqCb"
|
||||
"fileId": "1b2GP4/atHM6NCjsr1dg9F"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
@@ -2179,69 +2239,18 @@
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b0tljJoRdN7KaClR83qq9p",
|
||||
"fileId": "52Qv15VLNF3ridkwxGEMYb",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "max",
|
||||
"_name": "ResourceBar_Single_Btn_Blue2",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 144
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 150
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 152
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -67.96,
|
||||
"y": 109.163,
|
||||
"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": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 143
|
||||
"__id__": 137
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
@@ -2259,7 +2268,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"y": 2,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2299,8 +2308,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 48.443359375,
|
||||
"height": 54.4
|
||||
"width": 33,
|
||||
"height": 34
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -2311,10 +2320,10 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e97XUATdhLwouRznzgnMwd"
|
||||
"fileId": "09Ia0ast1JDLVlS/+tCjTJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
@@ -2335,11 +2344,426 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@fccb9",
|
||||
"__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": "08BAfoq+NDK7Lln615ZgOy"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c0WJcGU79E36oRyKnEYvno",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 137
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 151
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 33,
|
||||
"height": 34
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2cBRMszR5Gya6b3iMZCaWj"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 137
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 153
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b1ycugg2FKdoKccP5eYqCb"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b0tljJoRdN7KaClR83qq9p",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "max",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 156
|
||||
},
|
||||
{
|
||||
"__id__": 162
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 168
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 170
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 67.836,
|
||||
"y": -109.693,
|
||||
"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": "Label_Ribbon_Hologram",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 155
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 157
|
||||
},
|
||||
{
|
||||
"__id__": 159
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 161
|
||||
},
|
||||
"_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": 0.7,
|
||||
"y": 0.7,
|
||||
"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__": 156
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 158
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 53
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f2jJD3dFBL+Y9L5BBmsWkG"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 156
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 160
|
||||
},
|
||||
"_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@fe345",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1dawujIxRNx6RpkIVozXdt"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "39dgVowm1BfqNXCGCPbreA",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 155
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 163
|
||||
},
|
||||
{
|
||||
"__id__": 165
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_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.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 162
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 164
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 59.55419921875,
|
||||
"height": 54.4
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e97XUATdhLwouRznzgnMwd"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 162
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 166
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "MAX",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 20,
|
||||
"_fontSize": 20,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 25,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 0,
|
||||
@@ -2400,11 +2824,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 143
|
||||
"__id__": 155
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 151
|
||||
"__id__": 169
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -2445,7 +2869,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 154
|
||||
"__id__": 172
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -2473,7 +2897,7 @@
|
||||
},
|
||||
"_enabled": false,
|
||||
"__prefab": {
|
||||
"__id__": 156
|
||||
"__id__": 174
|
||||
},
|
||||
"_alignFlags": 40,
|
||||
"_target": null,
|
||||
@@ -2509,7 +2933,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 158
|
||||
"__id__": 176
|
||||
},
|
||||
"lbl_name": {
|
||||
"__id__": 116
|
||||
@@ -2528,7 +2952,7 @@
|
||||
"__id__": 137
|
||||
},
|
||||
"node_max": {
|
||||
"__id__": 143
|
||||
"__id__": 155
|
||||
},
|
||||
"node_lock": {
|
||||
"__id__": 131
|
||||
@@ -2551,10 +2975,10 @@
|
||||
"instance": null,
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 160
|
||||
"__id__": 178
|
||||
},
|
||||
{
|
||||
"__id__": 162
|
||||
"__id__": 180
|
||||
}
|
||||
],
|
||||
"nestedPrefabInstanceRoots": [
|
||||
@@ -2574,7 +2998,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 161
|
||||
"__id__": 179
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2586,7 +3010,7 @@
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": {
|
||||
"__id__": 157
|
||||
"__id__": 175
|
||||
},
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
@@ -2596,7 +3020,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 163
|
||||
"__id__": 181
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
455
assets/resources/gui/element/tabbg.prefab
Normal file
455
assets/resources/gui/element/tabbg.prefab
Normal file
@@ -0,0 +1,455 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "tabbg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "tabbg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_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": "Button_Round10_Bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_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.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 200,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "89ExmBHcpKc7F/UCyJ3KVv"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 49,
|
||||
"g": 129,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@1b34c",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_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": "27VQ1+kJdGsoQ3ej46kzWJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 50,
|
||||
"_originalHeight": 53,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e1OHIcXEhHtKpvcqVcRR41"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "6fJKu/YJBFg7eiQAKtUDuL",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Button_Round10_Light",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -4.180999999999997,
|
||||
"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__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 190,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "aaqyFNvg5Oy6UGI2b8aghR"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 50
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@8dd1b",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_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": "00bwIy/hdD9L0xVvdTMNXx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 5,
|
||||
"_right": 5,
|
||||
"_top": 4.181,
|
||||
"_bottom": -4.181,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 40,
|
||||
"_originalHeight": 26,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "127ifEJaBOVZ991Ed6Sy7a"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d4fVLEJo5H+bYkF/1/Q5Cj",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 200,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "c1LOkK8rJGgaH1Y/RA2sej"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b6wCk5tlZEMqEmX5Myn34Y",
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
13
assets/resources/gui/element/tabbg.prefab.meta
Normal file
13
assets/resources/gui/element/tabbg.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "f42da8df-b2a0-49a4-a1ce-dcfe5e62e0c8",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "tabbg"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
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: 991 KiB After Width: | Height: | Size: 994 KiB |
@@ -9,7 +9,7 @@ import { GameScoreStats } from "./config/HeroAttrs";
|
||||
import { mLogger } from "./Logger";
|
||||
import { gameDataSync } from "./GameDataSync";
|
||||
import { HERO_UPGRADE_NEED_FRAGMENTS } from "./config/GameSet";
|
||||
import { TalentSet, getTalentUpgradeCost, isTalentTierUnlocked } from "./config/TalentSet";
|
||||
import { TalentSet, TALENT_LEVEL_MAX, getTalentLevelExp, getTalentUpgradeCost, isTalentTierUnlocked } from "./config/TalentSet";
|
||||
|
||||
/**
|
||||
* 用远程数据覆盖本地数据(统一方法)
|
||||
@@ -40,6 +40,10 @@ export interface GameDate {
|
||||
talents?: Record<number, number>,
|
||||
/** 当前可用天赋点数(升级天赋消耗,经验/等级系统接入后由其产出) */
|
||||
talent_points?: number,
|
||||
/** 天赋当前等级(0 起步,区间 0~29,共 30 级) */
|
||||
talent_lv?: number,
|
||||
/** 天赋当前等级已累计的经验值 */
|
||||
talent_exp?: number,
|
||||
}
|
||||
export interface CloudData {
|
||||
openid: string;
|
||||
@@ -130,6 +134,10 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
talents: {} as Record<number, number>,
|
||||
/** 可用天赋点数 */
|
||||
talent_points: 0,
|
||||
/** 天赋等级(0 起步) */
|
||||
talent_lv: 0,
|
||||
/** 当前等级已累计经验 */
|
||||
talent_exp: 0,
|
||||
}
|
||||
|
||||
vmdata: any = {
|
||||
@@ -415,6 +423,46 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
oops.message.dispatchEvent(GameEvent.TALENT_UPDATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取天赋等级(0 起步,区间 0~29,共 30 级)
|
||||
*/
|
||||
getTalentLevel(): number {
|
||||
return this.data.talent_lv ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前等级已累计经验
|
||||
*/
|
||||
getTalentExp(): number {
|
||||
return this.data.talent_exp ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加天赋经验并自动升级(可连升多级;每升 1 级产出 1 点天赋点)
|
||||
* Why: 升级阈值查 TALENT_LEVEL_EXP 配置表,满级(30 级)后不再累计经验。
|
||||
* @param count 增加的经验值(正数)
|
||||
*/
|
||||
addTalentExp(count: number): void {
|
||||
if (count <= 0) return;
|
||||
let lv = this.getTalentLevel();
|
||||
if (lv >= TALENT_LEVEL_MAX) return;
|
||||
let exp = this.getTalentExp() + count;
|
||||
// 支持一次加经验连升多级
|
||||
while (lv < TALENT_LEVEL_MAX) {
|
||||
const need = getTalentLevelExp(lv);
|
||||
if (need < 0 || exp < need) break;
|
||||
exp -= need;
|
||||
lv += 1;
|
||||
this.addTalentPoints(1);
|
||||
}
|
||||
// 满级后清空经验,进度条显示为满
|
||||
if (lv >= TALENT_LEVEL_MAX) exp = 0;
|
||||
this.data.talent_lv = lv;
|
||||
this.data.talent_exp = exp;
|
||||
gameDataSync.markDataDirty();
|
||||
oops.message.dispatchEvent(GameEvent.TALENT_UPDATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消耗天赋点升级天赋(升级即激活,下一局生效)
|
||||
* @param uuid 天赋 uuid
|
||||
|
||||
@@ -285,6 +285,26 @@ export function getTalentUpgradeCost(curLv: number): number {
|
||||
return TALENT_UPGRADE_COST[curLv];
|
||||
}
|
||||
|
||||
/** 天赋等级上限(不含):等级从 0 起步,区间 0~29,共 30 级;每升 1 级产出 1 点天赋点 */
|
||||
export const TALENT_LEVEL_MAX = 30;
|
||||
|
||||
/** 天赋升级经验表:索引为当前等级(0~28),值为升到下一级所需经验 */
|
||||
export const TALENT_LEVEL_EXP: number[] = [
|
||||
100, 120, 140, 170, 200, 240, 280, 330, 380, 440,
|
||||
510, 580, 660, 750, 850, 960, 1080, 1210, 1350, 1500,
|
||||
1670, 1850, 2050, 2270, 2510, 2770, 3060, 3380, 3730,
|
||||
];
|
||||
|
||||
/**
|
||||
* 查询天赋升到下一级所需经验
|
||||
* @param curLv 当前等级(0 起步)
|
||||
* @returns 升到下一级所需经验;已满级或非法等级返回 -1
|
||||
*/
|
||||
export function getTalentLevelExp(curLv: number): number {
|
||||
if (curLv < 0 || curLv >= TALENT_LEVEL_EXP.length) return -1;
|
||||
return TALENT_LEVEL_EXP[curLv];
|
||||
}
|
||||
|
||||
/** 阶位解锁门槛:前一阶累计投入 ≥ 该点数才能升级下一阶天赋 */
|
||||
export const TALENT_TIER_UNLOCK_THRESHOLD = 10;
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ export class SSkillBoxComp extends CCComp {
|
||||
@property(Label)
|
||||
private lv_label: Label = null;
|
||||
|
||||
/** 技能名称标签 */
|
||||
@property(Label)
|
||||
private name_label: Label = null;
|
||||
|
||||
/** 锁定遮罩节点(active 时表示技能未激活) */
|
||||
@property({ type: Node })
|
||||
private locked: Node = null;
|
||||
@@ -40,6 +44,8 @@ export class SSkillBoxComp extends CCComp {
|
||||
private card_lv: number = 1;
|
||||
/** 卡牌自定义图标ID(优先级最高,未定义则按 trigger_type 自动取) */
|
||||
private card_icon?: string;
|
||||
/** 技能名称(装备卡取卡牌名,英雄图鉴取技能名) */
|
||||
private skill_name: string = "";
|
||||
/** 触发类型(默认即时,保持向后兼容) */
|
||||
private trigger_type: CardTriggerType = CardTriggerType.Instant;
|
||||
/** 驻场技能词条列表(uuid 指向 FieldSkillSet 底座,value 为生效数值) */
|
||||
@@ -64,8 +70,10 @@ export class SSkillBoxComp extends CCComp {
|
||||
this.s_uuid = config.skill ?? uuid; // 获取实际的技能 UUID
|
||||
this.card_icon = config.icon; // 保存卡牌自定义图标(优先级最高)
|
||||
this.trigger_type = config.trigger_type ?? CardTriggerType.Instant;
|
||||
this.skill_name = config.name ?? "";
|
||||
} else {
|
||||
this.s_uuid = uuid;
|
||||
this.skill_name = "";
|
||||
}
|
||||
|
||||
this.updateUI();
|
||||
@@ -89,13 +97,16 @@ export class SSkillBoxComp extends CCComp {
|
||||
|
||||
/**
|
||||
* 设置技能激活状态:
|
||||
* - locked = true → 显示锁定遮罩,技能未激活
|
||||
* - locked = false → 隐藏锁定遮罩,技能已激活
|
||||
* - locked = true → 显示锁定遮罩,技能未激活(隐藏等级标签)
|
||||
* - locked = false → 隐藏锁定遮罩,技能已激活(恢复等级标签)
|
||||
*/
|
||||
setLocked(locked: boolean) {
|
||||
if (this.locked) {
|
||||
this.locked.active = locked;
|
||||
}
|
||||
if (this.lv_label) {
|
||||
this.lv_label.node.active = !locked;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,11 +130,34 @@ export class SSkillBoxComp extends CCComp {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析技能名称:
|
||||
* 优先取显式设置的卡牌名;否则按图标来源从 SkillSet / FieldSkillSet 取技能名。
|
||||
*/
|
||||
private resolveSkillName(): string {
|
||||
if (this.skill_name) return this.skill_name;
|
||||
if (this.hero_icon_source === "field") {
|
||||
return this.s_uuid ? (FieldSkillSet[this.s_uuid]?.name ?? "") : "";
|
||||
}
|
||||
if (this.hero_icon_source === "skill") {
|
||||
return this.s_uuid ? (SkillSet[this.s_uuid]?.name ?? "") : "";
|
||||
}
|
||||
if (this.trigger_type === CardTriggerType.Interval) {
|
||||
return this.s_uuid ? (SkillSet[this.s_uuid]?.name ?? "") : "";
|
||||
}
|
||||
if (this.trigger_type === CardTriggerType.Field) {
|
||||
const fieldUuid = this.field?.[0]?.uuid;
|
||||
return fieldUuid ? (FieldSkillSet[fieldUuid]?.name ?? "") : "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新 UI:
|
||||
* - 背景:根据技能等级切换对应颜色子节点显示
|
||||
* - 图标:从 uicons 图集获取
|
||||
* - 等级标签:显示技能卡等级
|
||||
* - 名称标签:显示技能名称
|
||||
* - 等级标签:显示技能等级(Lv.x 样式)
|
||||
*/
|
||||
updateUI() {
|
||||
// 按技能等级切换背景颜色节点(与 getLvColor 等级配色一致)
|
||||
@@ -158,9 +192,14 @@ export class SSkillBoxComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
// 显示技能等级
|
||||
// 显示技能名称
|
||||
if (this.name_label) {
|
||||
this.name_label.string = this.resolveSkillName();
|
||||
}
|
||||
|
||||
// 显示技能等级(Lv.x 样式)
|
||||
if (this.lv_label) {
|
||||
this.lv_label.string = `${this.card_lv}`;
|
||||
this.lv_label.string = `Lv.${this.card_lv}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* - TalentItemComp —— 单张迷你升级卡
|
||||
* - smc —— 天赋等级表/点数/升级/重置
|
||||
*/
|
||||
import { _decorator, instantiate, Label, Node, NodeEventType, Prefab, UITransform } from "cc";
|
||||
import { _decorator, instantiate, Label, Node, NodeEventType, Prefab, ProgressBar, UITransform } 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 {
|
||||
TalentSet, TalentTier,
|
||||
TALENT_TIER_UNLOCK_THRESHOLD,
|
||||
getTalentTierInvestedPoints, getTalentUpgradeCost, isTalentTierUnlocked,
|
||||
getTalentLevelExp, getTalentTierInvestedPoints, getTalentUpgradeCost, isTalentTierUnlocked,
|
||||
} from "../common/config/TalentSet";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
@@ -39,6 +39,12 @@ const TIER_TAB_TEXT: Record<number, { title: string; lockName: string }> = {
|
||||
/** 阶位页签选中高亮子节点名(可选,编辑器侧搭建) */
|
||||
const TAB_SELECTED_CHILD = "sp_on";
|
||||
|
||||
/** 阶位页签锁定图标子节点名(可选;阶位未解锁时显示) */
|
||||
const TAB_LOCKED_CHILD = "locked";
|
||||
|
||||
/** 阶位页签未选中态子节点名(可选;非当前选中页签时显示) */
|
||||
const TAB_INACTIVE_CHILD = "noactive";
|
||||
|
||||
/** TalentsComp —— 天赋加点页组件(阶位 Tab 单屏聚焦) */
|
||||
@ccclass('TalentsComp')
|
||||
@ecs.register('Talents', false)
|
||||
@@ -53,6 +59,12 @@ export class TalentsComp extends CCComp {
|
||||
@property({ type: Label, tooltip: "页头可用天赋点" })
|
||||
lbl_points: Label = null!;
|
||||
|
||||
@property({ type: Label, tooltip: "天赋等级文案(Lv.x 样式)" })
|
||||
lbl_lv: Label = null!;
|
||||
|
||||
@property({ type: ProgressBar, tooltip: "当前等级经验进度条" })
|
||||
progress_exp: ProgressBar = null!;
|
||||
|
||||
@property({ type: Node, tooltip: "一阶页签节点" })
|
||||
tab_basic: Node = null!;
|
||||
|
||||
@@ -129,7 +141,18 @@ export class TalentsComp extends CCComp {
|
||||
if (!this.talents_content || !this.prefab_talent_item) return;
|
||||
const levels = smc.getTalentLevels();
|
||||
|
||||
if (this.lbl_points) this.lbl_points.string = `天赋点 ${smc.getTalentPoints()}`;
|
||||
if (this.lbl_points) this.lbl_points.string = `${smc.getTalentPoints()}`;
|
||||
|
||||
// 天赋等级(Lv.x)与当前等级经验进度
|
||||
const talentLv = smc.getTalentLevel();
|
||||
if (this.lbl_lv) this.lbl_lv.string = `Lv.${talentLv}`;
|
||||
if (this.progress_exp) {
|
||||
const needExp = getTalentLevelExp(talentLv);
|
||||
// 满级后进度条显示为满
|
||||
this.progress_exp.progress = needExp > 0
|
||||
? Math.min(1, smc.getTalentExp() / needExp)
|
||||
: 1;
|
||||
}
|
||||
|
||||
// 仅首次进入时默认选中已解锁的最高阶,后续刷新保持玩家当前选择
|
||||
if (!this.inited) {
|
||||
@@ -142,21 +165,30 @@ export class TalentsComp extends CCComp {
|
||||
this.refreshGrid(levels);
|
||||
}
|
||||
|
||||
/** 页签文案 + 解锁进度 + 选中高亮(sp_on 子节点可选) */
|
||||
/** 页签文案 + 解锁进度 + 选中高亮(sp_on)+ 锁定图标(locked)+ 未选中态(noactive) */
|
||||
private refreshTabs(levels: Record<number, number>): void {
|
||||
for (const [tier, tab] of this.tabNodes) {
|
||||
const text = TIER_TAB_TEXT[tier];
|
||||
const unlocked = isTalentTierUnlocked(levels, tier);
|
||||
if (tab.label) {
|
||||
if (tier === TalentTier.Basic) {
|
||||
if (unlocked) {
|
||||
tab.label.string = text.title;
|
||||
} else {
|
||||
const unlocked = isTalentTierUnlocked(levels, tier);
|
||||
const invested = getTalentTierInvestedPoints(levels, (tier - 1) as TalentTier);
|
||||
tab.label.string = unlocked ? text.title : `${text.title} ${invested}/${TALENT_TIER_UNLOCK_THRESHOLD}`;
|
||||
tab.label.string = `${text.title} ${invested}/${TALENT_TIER_UNLOCK_THRESHOLD}`;
|
||||
}
|
||||
}
|
||||
// 锁定图标:该阶未解锁时显示,解锁后隐藏(一阶恒解锁,节点可缺省)
|
||||
const locked = tab.node?.getChildByName(TAB_LOCKED_CHILD);
|
||||
if (locked) locked.active = !unlocked;
|
||||
|
||||
const selected = tier === this.curTier;
|
||||
// 未选中态节点:非当前激活页签时显示(与 sp_on 选中高亮互斥)
|
||||
const inactive = tab.node?.getChildByName(TAB_INACTIVE_CHILD);
|
||||
if (inactive) inactive.active = !selected;
|
||||
|
||||
tab.node?.getChildByName(TAB_SELECTED_CHILD)?.setPosition(0, 0);
|
||||
tab.node?.getChildByName(TAB_SELECTED_CHILD) && (tab.node.getChildByName(TAB_SELECTED_CHILD)!.active = tier === this.curTier);
|
||||
tab.node?.getChildByName(TAB_SELECTED_CHILD) && (tab.node.getChildByName(TAB_SELECTED_CHILD)!.active = selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user