Browse Source

初始卡牌改色bug

pull/67/head
yjm484 1 year ago
parent
commit
7e5d4f6655
  1. 382
      ColorlessWorld-2024-4-2/Assets/GameDate/LevelDate/LevelState_1.asset
  2. 2
      ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs
  3. 14
      ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs
  4. 34
      ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs

382
ColorlessWorld-2024-4-2/Assets/GameDate/LevelDate/LevelState_1.asset

@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: LevelState_1
m_EditorClassIdentifier:
levelStep: 0
currentPoint: {x: 1, y: 3}
currentPoint: {x: 3, y: 1}
levelSaveMap:
- levelDataList:
- roomType: 0
@ -26,22 +26,23 @@ MonoBehaviour:
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 0
passBy: 1
nodePos: {x: -7.583021, y: 0.05970764, z: -7.679106}
line: 0
column: 1
fatherLevelNodes: []
nextLevelNodes:
- {x: 1, y: 2}
- {x: 1, y: 0}
- roomType: 0
isUse: 1
passBy: 1
passBy: 0
nodePos: {x: -7.583029, y: 0.05970955, z: -6.679107}
line: 0
column: 2
fatherLevelNodes: []
nextLevelNodes:
- {x: 1, y: 3}
- {x: 1, y: 2}
- roomType: 0
isUse: 1
passBy: 0
@ -50,7 +51,8 @@ MonoBehaviour:
column: 3
fatherLevelNodes: []
nextLevelNodes:
- {x: 1, y: 4}
- {x: 1, y: 3}
- {x: 1, y: 2}
- roomType: 0
isUse: 0
passBy: 0
@ -60,17 +62,17 @@ MonoBehaviour:
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 0
- roomType: 3
isUse: 1
passBy: 0
passBy: 1
nodePos: {x: -5.4530487, y: 0.059719086, z: -8.679108}
line: 1
column: 0
fatherLevelNodes:
- {x: 0, y: 1}
nextLevelNodes:
- {x: 2, y: 1}
- roomType: 0
- {x: 2, y: 0}
- roomType: 3
isUse: 0
passBy: 0
nodePos: {x: -5.4530506, y: 0.059720993, z: -7.679108}
@ -78,43 +80,48 @@ MonoBehaviour:
column: 1
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 0
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: -5.4530544, y: 0.0597229, z: -6.679111}
line: 1
column: 2
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 1
nodePos: {x: -5.45306, y: 0.059724808, z: -5.679114}
line: 1
column: 3
fatherLevelNodes:
- {x: 0, y: 1}
- {x: 0, y: 2}
- {x: 0, y: 3}
nextLevelNodes:
- {x: 2, y: 2}
- {x: 2, y: 1}
- roomType: 0
isUse: 1
passBy: 0
nodePos: {x: -5.453064, y: 0.059726715, z: -4.679116}
nodePos: {x: -5.45306, y: 0.059724808, z: -5.679114}
line: 1
column: 4
column: 3
fatherLevelNodes:
- {x: 0, y: 3}
nextLevelNodes:
- {x: 2, y: 4}
- levelDataList:
- roomType: 0
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: -5.453064, y: 0.059726715, z: -4.679116}
line: 1
column: 4
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 5
isUse: 1
passBy: 1
nodePos: {x: -3.3230686, y: 0.059732437, z: -8.679108}
line: 2
column: 0
fatherLevelNodes: []
nextLevelNodes: []
fatherLevelNodes:
- {x: 1, y: 0}
nextLevelNodes:
- {x: 3, y: 1}
- roomType: 5
isUse: 1
passBy: 0
@ -122,9 +129,8 @@ MonoBehaviour:
line: 2
column: 1
fatherLevelNodes:
- {x: 1, y: 0}
- {x: 1, y: 2}
nextLevelNodes:
- {x: 3, y: 0}
- {x: 3, y: 1}
- roomType: 0
isUse: 1
@ -133,10 +139,10 @@ MonoBehaviour:
line: 2
column: 2
fatherLevelNodes:
- {x: 1, y: 3}
- {x: 1, y: 2}
nextLevelNodes:
- {x: 3, y: 1}
- roomType: 4
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: -3.32308, y: 0.05973816, z: -5.679112}
@ -151,33 +157,32 @@ MonoBehaviour:
line: 2
column: 4
fatherLevelNodes:
- {x: 1, y: 4}
- {x: 1, y: 3}
nextLevelNodes:
- {x: 3, y: 4}
- {x: 3, y: 3}
- levelDataList:
- roomType: 5
isUse: 1
- roomType: 0
isUse: 0
passBy: 0
nodePos: {x: -1.1930923, y: 0.05974579, z: -8.679106}
line: 3
column: 0
fatherLevelNodes:
- {x: 2, y: 1}
nextLevelNodes:
- {x: 4, y: 1}
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 0
passBy: 1
nodePos: {x: -1.1930962, y: 0.059747696, z: -7.679107}
line: 3
column: 1
fatherLevelNodes:
- {x: 2, y: 1}
- {x: 2, y: 2}
- {x: 2, y: 0}
- {x: 2, y: 1}
nextLevelNodes:
- {x: 4, y: 1}
- {x: 4, y: 2}
- roomType: 1
- {x: 4, y: 1}
- roomType: 0
isUse: 0
passBy: 0
nodePos: {x: -1.1931, y: 0.059749603, z: -6.679109}
@ -185,25 +190,24 @@ MonoBehaviour:
column: 2
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 4
isUse: 0
passBy: 0
nodePos: {x: -1.1931033, y: 0.05975151, z: -5.679111}
line: 3
column: 3
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 0
nodePos: {x: -1.1931071, y: 0.059753418, z: -4.679114}
nodePos: {x: -1.1931033, y: 0.05975151, z: -5.679111}
line: 3
column: 4
column: 3
fatherLevelNodes:
- {x: 2, y: 4}
nextLevelNodes:
- {x: 4, y: 4}
- {x: 4, y: 3}
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: -1.1931071, y: 0.059753418, z: -4.679114}
line: 3
column: 4
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 0
isUse: 0
@ -213,19 +217,18 @@ MonoBehaviour:
column: 0
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 3
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 0.93688774, y: 0.059761047, z: -7.67911}
line: 4
column: 1
fatherLevelNodes:
- {x: 3, y: 0}
- {x: 3, y: 1}
nextLevelNodes:
- {x: 5, y: 2}
- {x: 5, y: 1}
- {x: 5, y: 0}
- roomType: 0
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 0.93688583, y: 0.059762955, z: -6.679111}
@ -234,17 +237,15 @@ MonoBehaviour:
fatherLevelNodes:
- {x: 3, y: 1}
nextLevelNodes:
- {x: 5, y: 2}
- roomType: 3
isUse: 1
- {x: 5, y: 1}
- roomType: 1
isUse: 0
passBy: 0
nodePos: {x: 0.93688345, y: 0.059764862, z: -5.679114}
line: 4
column: 3
fatherLevelNodes:
- {x: 3, y: 4}
nextLevelNodes:
- {x: 5, y: 2}
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 0
@ -252,11 +253,11 @@ MonoBehaviour:
line: 4
column: 4
fatherLevelNodes:
- {x: 3, y: 4}
- {x: 3, y: 3}
nextLevelNodes:
- {x: 5, y: 3}
- levelDataList:
- roomType: 5
- roomType: 0
isUse: 1
passBy: 0
nodePos: {x: 3.0668812, y: 0.05977249, z: -8.679108}
@ -265,29 +266,27 @@ MonoBehaviour:
fatherLevelNodes:
- {x: 4, y: 1}
nextLevelNodes:
- {x: 6, y: 1}
- roomType: 0
isUse: 0
- {x: 6, y: 0}
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 3.0668805, y: 0.0597744, z: -7.679108}
line: 5
column: 1
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 3.0668807, y: 0.059776306, z: -6.67911}
line: 5
column: 2
fatherLevelNodes:
- {x: 4, y: 1}
- {x: 4, y: 2}
- {x: 4, y: 3}
- {x: 4, y: 1}
nextLevelNodes:
- {x: 6, y: 3}
- {x: 6, y: 1}
- {x: 6, y: 2}
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 3.0668807, y: 0.059776306, z: -6.67911}
line: 5
column: 2
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
isUse: 1
passBy: 0
@ -298,7 +297,7 @@ MonoBehaviour:
- {x: 4, y: 4}
nextLevelNodes:
- {x: 6, y: 3}
- roomType: 0
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 3.0668788, y: 0.05978012, z: -4.679114}
@ -308,13 +307,15 @@ MonoBehaviour:
nextLevelNodes: []
- levelDataList:
- roomType: 6
isUse: 0
isUse: 1
passBy: 0
nodePos: {x: 5.1968794, y: 0.059785843, z: -8.679108}
line: 6
column: 0
fatherLevelNodes: []
nextLevelNodes: []
fatherLevelNodes:
- {x: 5, y: 0}
nextLevelNodes:
- {x: 7, y: 0}
- roomType: 6
isUse: 1
passBy: 0
@ -322,11 +323,10 @@ MonoBehaviour:
line: 6
column: 1
fatherLevelNodes:
- {x: 5, y: 0}
- {x: 5, y: 2}
- {x: 5, y: 1}
nextLevelNodes:
- {x: 7, y: 0}
- {x: 7, y: 2}
- {x: 7, y: 0}
- roomType: 6
isUse: 1
passBy: 0
@ -334,9 +334,9 @@ MonoBehaviour:
line: 6
column: 2
fatherLevelNodes:
- {x: 5, y: 2}
- {x: 5, y: 1}
nextLevelNodes:
- {x: 7, y: 2}
- {x: 7, y: 3}
- roomType: 6
isUse: 1
passBy: 0
@ -344,10 +344,8 @@ MonoBehaviour:
line: 6
column: 3
fatherLevelNodes:
- {x: 5, y: 2}
- {x: 5, y: 3}
nextLevelNodes:
- {x: 7, y: 2}
- {x: 7, y: 3}
- roomType: 6
isUse: 0
@ -358,7 +356,7 @@ MonoBehaviour:
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 4
- roomType: 0
isUse: 1
passBy: 0
nodePos: {x: 7.3268824, y: 0.059799194, z: -8.679108}
@ -366,9 +364,11 @@ MonoBehaviour:
column: 0
fatherLevelNodes:
- {x: 6, y: 1}
- {x: 6, y: 0}
nextLevelNodes:
- {x: 8, y: 0}
- roomType: 5
- {x: 8, y: 1}
- roomType: 0
isUse: 0
passBy: 0
nodePos: {x: 7.3268833, y: 0.0598011, z: -7.67911}
@ -376,19 +376,17 @@ MonoBehaviour:
column: 1
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 7.326885, y: 0.05980301, z: -6.679111}
line: 7
column: 2
fatherLevelNodes:
- {x: 6, y: 3}
- {x: 6, y: 1}
- {x: 6, y: 2}
nextLevelNodes:
- {x: 8, y: 1}
- roomType: 1
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 7.3268857, y: 0.059804916, z: -5.679114}
@ -396,9 +394,11 @@ MonoBehaviour:
column: 3
fatherLevelNodes:
- {x: 6, y: 3}
- {x: 6, y: 2}
nextLevelNodes:
- {x: 8, y: 3}
- roomType: 0
- {x: 8, y: 4}
- {x: 8, y: 2}
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 7.326885, y: 0.059806824, z: -4.679115}
@ -407,7 +407,7 @@ MonoBehaviour:
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 0
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 9.456891, y: 0.059812546, z: -8.679108}
@ -416,7 +416,7 @@ MonoBehaviour:
fatherLevelNodes:
- {x: 7, y: 0}
nextLevelNodes:
- {x: 9, y: 1}
- {x: 9, y: 0}
- roomType: 0
isUse: 1
passBy: 0
@ -425,44 +425,49 @@ MonoBehaviour:
column: 1
fatherLevelNodes:
- {x: 7, y: 2}
- {x: 7, y: 0}
nextLevelNodes:
- {x: 9, y: 1}
- {x: 9, y: 2}
- roomType: 3
isUse: 0
- {x: 9, y: 1}
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 9.456895, y: 0.05981636, z: -6.67911}
line: 8
column: 2
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 3
isUse: 1
passBy: 0
nodePos: {x: 9.456898, y: 0.059818268, z: -5.679112}
line: 8
column: 3
fatherLevelNodes:
- {x: 7, y: 3}
nextLevelNodes:
- {x: 9, y: 2}
- roomType: 1
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 9.456898, y: 0.059820175, z: -4.679116}
nodePos: {x: 9.456898, y: 0.059818268, z: -5.679112}
line: 8
column: 4
column: 3
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 0
isUse: 0
isUse: 1
passBy: 0
nodePos: {x: 9.456898, y: 0.059820175, z: -4.679116}
line: 8
column: 4
fatherLevelNodes:
- {x: 7, y: 3}
nextLevelNodes:
- {x: 9, y: 3}
- levelDataList:
- roomType: 4
isUse: 1
passBy: 0
nodePos: {x: 11.586908, y: 0.059825897, z: -8.679108}
line: 9
column: 0
fatherLevelNodes: []
nextLevelNodes: []
fatherLevelNodes:
- {x: 8, y: 0}
nextLevelNodes:
- {x: 10, y: 0}
- roomType: 0
isUse: 1
passBy: 0
@ -471,11 +476,9 @@ MonoBehaviour:
column: 1
fatherLevelNodes:
- {x: 8, y: 1}
- {x: 8, y: 0}
nextLevelNodes:
- {x: 10, y: 0}
- {x: 10, y: 1}
- roomType: 1
- {x: 10, y: 2}
- roomType: 3
isUse: 1
passBy: 0
nodePos: {x: 11.586914, y: 0.059829712, z: -6.679111}
@ -483,19 +486,20 @@ MonoBehaviour:
column: 2
fatherLevelNodes:
- {x: 8, y: 1}
- {x: 8, y: 3}
- {x: 8, y: 2}
nextLevelNodes:
- {x: 10, y: 1}
- {x: 10, y: 3}
- roomType: 0
isUse: 0
- {x: 10, y: 2}
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 11.58692, y: 0.05983162, z: -5.679112}
line: 9
column: 3
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 0
fatherLevelNodes:
- {x: 8, y: 4}
nextLevelNodes:
- {x: 10, y: 2}
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 11.586924, y: 0.059833527, z: -4.679114}
@ -504,48 +508,47 @@ MonoBehaviour:
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 4
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 13.71693, y: 0.05983925, z: -8.679108}
line: 10
column: 0
fatherLevelNodes:
- {x: 9, y: 1}
- {x: 9, y: 0}
nextLevelNodes:
- {x: 11, y: 1}
- roomType: 0
isUse: 1
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 13.716934, y: 0.059841156, z: -7.679107}
line: 10
column: 1
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 4
isUse: 1
passBy: 0
nodePos: {x: 13.716938, y: 0.059843063, z: -6.679109}
line: 10
column: 2
fatherLevelNodes:
- {x: 9, y: 1}
- {x: 9, y: 2}
- {x: 9, y: 1}
- {x: 9, y: 3}
nextLevelNodes:
- {x: 11, y: 3}
- {x: 11, y: 1}
- {x: 11, y: 2}
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 13.716938, y: 0.059843063, z: -6.679109}
nodePos: {x: 13.71694, y: 0.05984497, z: -5.679113}
line: 10
column: 2
column: 3
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 5
isUse: 1
passBy: 0
nodePos: {x: 13.71694, y: 0.05984497, z: -5.679113}
line: 10
column: 3
fatherLevelNodes:
- {x: 9, y: 2}
nextLevelNodes:
- {x: 11, y: 4}
- {x: 11, y: 3}
- roomType: 1
isUse: 0
passBy: 0
nodePos: {x: 13.716942, y: 0.059846878, z: -4.679115}
@ -554,7 +557,7 @@ MonoBehaviour:
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 1
- roomType: 5
isUse: 0
passBy: 0
nodePos: {x: 15.846952, y: 0.0598526, z: -8.67911}
@ -562,7 +565,7 @@ MonoBehaviour:
column: 0
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 1
- roomType: 0
isUse: 1
passBy: 0
nodePos: {x: 15.846956, y: 0.059854507, z: -7.67911}
@ -570,69 +573,70 @@ MonoBehaviour:
column: 1
fatherLevelNodes:
- {x: 10, y: 0}
- {x: 10, y: 1}
- {x: 10, y: 2}
nextLevelNodes:
- {x: 12, y: 1}
- {x: 12, y: 0}
- roomType: 0
- {x: 12, y: 2}
- roomType: 3
isUse: 1
passBy: 0
nodePos: {x: 15.84696, y: 0.059856415, z: -6.679111}
line: 11
column: 2
fatherLevelNodes:
- {x: 10, y: 1}
- {x: 10, y: 2}
nextLevelNodes:
- {x: 12, y: 3}
- roomType: 0
- {x: 12, y: 2}
- roomType: 1
isUse: 1
passBy: 0
nodePos: {x: 15.846966, y: 0.059858322, z: -5.679114}
line: 11
column: 3
fatherLevelNodes:
- {x: 10, y: 3}
- {x: 10, y: 2}
nextLevelNodes:
- {x: 12, y: 4}
- roomType: 5
isUse: 1
- {x: 12, y: 2}
- {x: 12, y: 3}
- roomType: 0
isUse: 0
passBy: 0
nodePos: {x: 15.846968, y: 0.05986023, z: -4.679115}
line: 11
column: 4
fatherLevelNodes:
- {x: 10, y: 3}
nextLevelNodes:
- {x: 12, y: 4}
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 4
isUse: 1
isUse: 0
passBy: 0
nodePos: {x: 17.976984, y: 0.05986595, z: -8.679108}
line: 12
column: 0
fatherLevelNodes:
- {x: 11, y: 1}
nextLevelNodes:
- {x: 13, y: 2}
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 4
isUse: 1
isUse: 0
passBy: 0
nodePos: {x: 17.976994, y: 0.05986786, z: -7.679109}
line: 12
column: 1
fatherLevelNodes:
- {x: 11, y: 1}
nextLevelNodes:
- {x: 13, y: 2}
fatherLevelNodes: []
nextLevelNodes: []
- roomType: 4
isUse: 0
isUse: 1
passBy: 0
nodePos: {x: 17.977, y: 0.059869766, z: -6.679111}
line: 12
column: 2
fatherLevelNodes: []
nextLevelNodes: []
fatherLevelNodes:
- {x: 11, y: 3}
- {x: 11, y: 1}
- {x: 11, y: 2}
nextLevelNodes:
- {x: 13, y: 2}
- {x: 13, y: 2}
- {x: 13, y: 2}
- {x: 13, y: 2}
- roomType: 4
isUse: 1
passBy: 0
@ -640,21 +644,17 @@ MonoBehaviour:
line: 12
column: 3
fatherLevelNodes:
- {x: 11, y: 2}
- {x: 11, y: 3}
nextLevelNodes:
- {x: 13, y: 2}
- roomType: 4
isUse: 1
isUse: 0
passBy: 0
nodePos: {x: 17.977015, y: 0.05987358, z: -4.679114}
line: 12
column: 4
fatherLevelNodes:
- {x: 11, y: 4}
- {x: 11, y: 3}
nextLevelNodes:
- {x: 13, y: 2}
- {x: 13, y: 2}
fatherLevelNodes: []
nextLevelNodes: []
- levelDataList:
- roomType: 2
isUse: 0
@ -679,11 +679,11 @@ MonoBehaviour:
line: 13
column: 2
fatherLevelNodes:
- {x: 12, y: 1}
- {x: 12, y: 0}
- {x: 12, y: 2}
- {x: 12, y: 2}
- {x: 12, y: 2}
- {x: 12, y: 3}
- {x: 12, y: 4}
- {x: 12, y: 4}
- {x: 12, y: 2}
nextLevelNodes: []
- roomType: 2
isUse: 0
@ -701,4 +701,4 @@ MonoBehaviour:
column: 4
fatherLevelNodes: []
nextLevelNodes: []
fightEenemyPool: weak
fightEenemyPool: strong

2
ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs

@ -421,7 +421,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag
Debug.Log(Mouse.current.position.value);
if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value))
{
Debug.Log(raycastHit.collider.gameObject.name);
//Debug.Log(raycastHit.collider.gameObject.name);
//检测到跟上次瞄准地方不同,更新
if (currentNode == null || raycastHit.collider.transform.gameObject != currentNode.gameObject)
{

14
ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs

@ -147,8 +147,8 @@ public class CardEntity : MonoBehaviour
Vector3 pos = Camera.main.ScreenToWorldPoint(dis);
player.FlipLocalScale(pos);
//debug¿¨Ãû
Debug.Log("打出"+cardOriginalData.ChineseName);
Debug.Log("结算时候influencePreviewPool大小" + influencePreviewPool.Count);
//Debug.Log("打出"+cardOriginalData.ChineseName);
//Debug.Log("结算时候influencePreviewPool大小" + influencePreviewPool.Count);
//½áËãЧ¹û
yield return StartCoroutine(DestructionManager.Instance.startDestoryAndUseCard(this.gameObject, cardOriginalData, influencePreviewPool, cardIndex, targetNode));
@ -254,7 +254,7 @@ public class CardEntity : MonoBehaviour
//createFun(3);
break;
}
createTrueFun(needTrueFun);
createTrueFun(needTrueFun);
summarizeNodeColor();
@ -512,12 +512,12 @@ public class CardEntity : MonoBehaviour
for (int i = 0; i < cardOriginalData.conditionAndFunctionVal.Count; i++)
{
KeyValuePair<string, Tuple<string, string>> kvp = cardOriginalData.conditionAndFunctionVal.ElementAt(i);
Debug.Log("key是" + kvp.Key + "value是" + kvp.Value + "cardId是" + cardOriginalData.CardId);
//Debug.Log("key是" + kvp.Key + "value是" + kvp.Value + "cardId是" + cardOriginalData.CardId);
string[] functions = kvp.Value.Item1.Split("_");
string[] vals = kvp.Value.Item2.Split("_");
for (int j = 0; j < functions.Length; j++)
{
Debug.Log("cardId是" + cardOriginalData.CardId + "功能是" + functions[j] + "数值是" + vals[j]);
//Debug.Log("cardId是" + cardOriginalData.CardId + "功能是" + functions[j] + "数值是" + vals[j]);
cardOriginalData.originFunctionVal.Add(functions[j]);
}
@ -556,7 +556,7 @@ public class CardEntity : MonoBehaviour
if (GameManager.Instance.playerOn.whoColour.Equals(Name.NodeColor.Green))
{
int range = cardOriginalData.CastingRange + 1;
Debug.Log("range是" + range);
//Debug.Log("range是" + range);
castRange.text = range.ToString();
}
else
@ -615,10 +615,12 @@ public class CardEntity : MonoBehaviour
List<bool> matchList=new List<bool>();
KeyValuePair<string, Tuple<string, string>> kvp = cardOriginalData.conditionAndFunctionVal.ElementAt(i);
string[] keys= kvp.Key.Split("_");
Debug.Log("cardId是" + cardOriginalData.CardId + "key是" + keys);
string[] functions = kvp.Value.Item1.Split("_");
string[] vals = kvp.Value.Item2.Split("_");
for (int j = 0; j < keys.Length; j++)
{
if (keys[j].Equals(Name.Condition.None))
{
//cardFunToLose.Remove(keys[j]);

34
ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs

@ -46,28 +46,32 @@ public class CardManager : Singleton<CardManager>
string pattern = @"(\w+)([><=])(\d+)";
string[] conditions=condition.Split("_");
StringBuilder sb = new StringBuilder();
for (int j = 0; j < conditions.Length; j++)
if (!condition.Equals(Name.none))
{
newCardOriginalData.originFunctionVal.Clear();
Match match = Regex.Match(conditions[j], pattern);
if (match.Success)
for (int j = 0; j < conditions.Length; j++)
{
string beforecolor = match.Groups[1].Value; // 颜色部分
string op = match.Groups[2].Value; // 运算符部分
string number = match.Groups[3].Value; // 数值部分
string newCon = newColor + op + number;
if (j != 0)
newCardOriginalData.originFunctionVal.Clear();
Match match = Regex.Match(conditions[j], pattern);
if (match.Success)
{
sb.Append("_");
string beforecolor = match.Groups[1].Value; // 颜色部分
string op = match.Groups[2].Value; // 运算符部分
string number = match.Groups[3].Value; // 数值部分
string newCon = newColor + op + number;
if (j != 0)
{
sb.Append("_");
}
sb.Append(newCon);
}
sb.Append(newCon);
}
Tuple<string, string> value = newCardOriginalData.conditionAndFunctionVal[condition];
newCardOriginalData.conditionAndFunctionVal.Remove(condition);
newCardOriginalData.conditionAndFunctionVal.Add(sb.ToString(), value);
}
Tuple<string, string> value = newCardOriginalData.conditionAndFunctionVal[condition];
newCardOriginalData.conditionAndFunctionVal.Remove(condition);
newCardOriginalData.conditionAndFunctionVal.Add(sb.ToString(), value);
}
for (int i = 0; i < newCardOriginalData.nodesColor.Length; i++)
{
if (!newCardOriginalData.nodesColor[i].Equals(Name.none))

Loading…
Cancel
Save