This commit is contained in:
GL 2025-01-06 16:15:50 +08:00
commit 06eb43b150
11 changed files with 613 additions and 146 deletions

View File

@ -96,5 +96,141 @@
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3}
],
"totalReward": 250
},
{
"wave": 6,
"spawnPoint": 1,
"enemies": [
{"id": "Enemy_007", "count": 1, "startTime": 0, "Reward": 8},
{"id": "Enemy_002", "count": 1, "startTime": 3000, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_007", "count": 1, "startTime": 3000, "Reward": 8},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_009", "count": 1, "startTime": 3000, "Reward": 8},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5}
],
"totalReward": 250
},
{
"wave": 7,
"spawnPoint": 1,
"enemies": [
{"id": "Enemy_012", "count": 1, "startTime": 0, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_011", "count": 1, "startTime": 500, "Reward": 10},
{"id": "Enemy_012", "count": 1, "startTime": 3000, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_011", "count": 1, "startTime": 500, "Reward": 10},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_011", "count": 1, "startTime": 500, "Reward": 10},
{"id": "Enemy_012", "count": 1, "startTime": 3000, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_011", "count": 1, "startTime": 500, "Reward": 10},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_012", "count": 1, "startTime": 500, "Reward": 5},
{"id": "Enemy_011", "count": 1, "startTime": 500, "Reward": 10}
],
"totalReward": 250
},
{
"wave": 8,
"spawnPoint": 1,
"enemies": [
{"id": "Enemy_010", "count": 1, "startTime": 0, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_008", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_008", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_008", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_005", "count": 1, "startTime": 500, "Reward": 8},
{"id": "Enemy_005", "count": 1, "startTime": 500, "Reward": 8}
],
"totalReward": 250
},
{
"wave": 9,
"spawnPoint": 1,
"enemies": [
{"id": "Enemy_002", "count": 2, "startTime": 0, "Reward": 3},
{"id": "Enemy_003", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 2, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_002", "count": 1, "startTime": 500, "Reward": 3},
{"id": "Enemy_010", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_010", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8},
{"id": "Enemy_006", "count": 2, "startTime": 3000, "Reward": 8}
],
"totalReward": 250
},
{
"wave": 10,
"spawnPoint": 3,
"enemies": [
{"id": "Enemy_004", "count": 3, "startTime": 0, "Reward": 3},
{"id": "Enemy_004", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_004", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_009", "count": 3, "startTime": 500, "Reward": 8},
{"id": "Enemy_004", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_004", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_004", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 3, "startTime": 3000, "Reward": 3},
{"id": "Enemy_003", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_008", "count": 3, "startTime": 500, "Reward": 8},
{"id": "Enemy_003", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_003", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_001", "count": 3, "startTime": 3000, "Reward": 3},
{"id": "Enemy_001", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_001", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_006", "count": 3, "startTime": 500, "Reward": 8},
{"id": "Enemy_001", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_001", "count": 3, "startTime": 500, "Reward": 3},
{"id": "Enemy_001", "count": 3, "startTime": 500, "Reward": 3}
],
"totalReward": 250
}
]

View File

@ -3601,21 +3601,6 @@ MonoBehaviour:
inPlaceNumber: 0
btnObj: {fileID: 1942153352}
IconTipObj: {fileID: 0}
mengyaoCardDataList:
- cardID: M_M_001
cardPrefab: {fileID: 6655435212987556048, guid: 383e65ed01369d345a73d626ab713888, type: 3}
- cardID: M_S_001
cardPrefab: {fileID: 5508436327438263543, guid: 12644a2c53bfc72489ad76e8f81628f5, type: 3}
- cardID: M_H_001
cardPrefab: {fileID: 1126466392417920613, guid: 0dd4a50e59d08e84fb1439c946c24fdc, type: 3}
- cardID: M_T_002
cardPrefab: {fileID: 6655435212987556048, guid: c7cffe9eb5ea6bb4791fe5c8bb025f01, type: 3}
- cardID: M_S_002
cardPrefab: {fileID: 5508436327438263543, guid: db8f2924fd8bba94e881e4b275b8b48a, type: 3}
- cardID: M_M_002
cardPrefab: {fileID: 6655435212987556048, guid: edec2410bf23cdd40a210a28e9c3624f, type: 3}
- cardID: M_J_001
cardPrefab: {fileID: 5508436327438263543, guid: c61070f2dd2a750439bf3913156d4f7b, type: 3}
parentPos: {fileID: 1136445683}
scaleUpDuration: 0.5
fadeInDuration: 0.5
@ -4441,6 +4426,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
MapLevelJson: {fileID: 4900000, guid: b534002cbb7fddf4bb68f34fb1357ff3, type: 3}
count: 0
--- !u!1 &1342038372
GameObject:
m_ObjectHideFlags: 0
@ -5546,7 +5532,6 @@ MonoBehaviour:
redMaskPre: {fileID: 2313792537985532392, guid: c4180378f5c580d439d8089a4ec25cb2, type: 3}
redMask: {fileID: 0}
KIllNumberText: {fileID: 1595305660}
maxEnemynumber: 20
allNumer: 0
Battle_Time: {fileID: 971885053}
Levels_number: {fileID: 744270342}
@ -5875,7 +5860,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1884241085}
- component: {fileID: 1884241086}
- component: {fileID: 1884241087}
m_Layer: 0
m_Name: SpawnMonster
@ -5899,28 +5883,6 @@ Transform:
m_Father: {fileID: 284432670}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1884241086
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1884241084}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fdf69f16194abb24d9e887468940e1cb, type: 3}
m_Name:
m_EditorClassIdentifier:
retbutton: {fileID: 0}
ClosureObj: {fileID: 0}
Enemys: []
Prefab: {fileID: 4703411402065954783, guid: aac4ad2c72526a54691494dd54e115a6, type: 3}
SpawnLocation: {fileID: 734893407}
GenerationInterval: 15
GenerationIntervalOfOne: 2
GenerateQuantityMax: 20
GenerateQuantity: 5
deadNumber: 0
--- !u!114 &1884241087
MonoBehaviour:
m_ObjectHideFlags: 0
@ -5983,8 +5945,42 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f6c570b2c3c14994fa8337757d1d492e, type: 3}
m_Name:
m_EditorClassIdentifier:
mengyaoItems: []
instane: {fileID: 0}
mengyaoItems:
- id: M_T_002
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 948b21abbed4a124bbe3d02caa37f317, type: 3}
prefab: {fileID: 8433650275485930554, guid: 0e629856be1575e4a9258394dee87cc7, type: 3}
cardprefab: {fileID: 6655435212987556048, guid: c7cffe9eb5ea6bb4791fe5c8bb025f01, type: 3}
- id: M_J_001
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: df5f98317f7ecb54bac7b97052a8d2dc, type: 3}
prefab: {fileID: 8433650275485930554, guid: 1e8a70ff26520dd4a8744ae2156d16d3, type: 3}
cardprefab: {fileID: 5508436327438263543, guid: c61070f2dd2a750439bf3913156d4f7b, type: 3}
- id: M_H_001
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 492e5984b518a80458cf575c0b57335c, type: 3}
prefab: {fileID: 8433650275485930554, guid: 67d13a9263159eb49993b8cc68eb3785, type: 3}
cardprefab: {fileID: 1126466392417920613, guid: 0dd4a50e59d08e84fb1439c946c24fdc, type: 3}
- id: M_M_001
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 5e3fd295650deeb4fa3395de2d789b8a, type: 3}
prefab: {fileID: 8433650275485930554, guid: 4f81cc16b1203d549b927ed7da53fdbf, type: 3}
cardprefab: {fileID: 6655435212987556048, guid: 383e65ed01369d345a73d626ab713888, type: 3}
- id: M_M_002
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: d6cae85a1dbf95e48a035af3e65d974f, type: 3}
prefab: {fileID: 8433650275485930554, guid: b7a992fcbbc242e4eb0b83eea3bfab81, type: 3}
cardprefab: {fileID: 6655435212987556048, guid: edec2410bf23cdd40a210a28e9c3624f, type: 3}
- id: M_S_001
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: a95e23a2fb1de5b429b428575fc6d229, type: 3}
prefab: {fileID: 8433650275485930554, guid: 1ce7ba2999a588840be40787ac4fb7fc, type: 3}
cardprefab: {fileID: 5508436327438263543, guid: 12644a2c53bfc72489ad76e8f81628f5, type: 3}
- id: M_S_002
imge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 8e7daa6a68986b944aae00387aabf4ea, type: 3}
prefab: {fileID: 8433650275485930554, guid: 71d5f6e53fdb1674aae2e6fa1acf423d, type: 3}
cardprefab: {fileID: 5508436327438263543, guid: db8f2924fd8bba94e881e4b275b8b48a, type: 3}
--- !u!114 &1910338487
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -9873,6 +9873,7 @@ GameObject:
- component: {fileID: 99292838}
- component: {fileID: 99292840}
- component: {fileID: 99292839}
- component: {fileID: 99292841}
m_Layer: 5
m_Name: lagantou
m_TagString: Untagged
@ -9938,6 +9939,50 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 99292837}
m_CullTransparentMesh: 1
--- !u!114 &99292841
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 99292837}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 99292839}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &99864169
GameObject:
m_ObjectHideFlags: 0
@ -34517,27 +34562,27 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 600
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 733
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 300
objectReference: {fileID: 0}
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -366.5
objectReference: {fileID: 0}
- target: {fileID: 3011360593729086421, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
propertyPath: m_Sprite
@ -101109,7 +101154,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1073200880
RectTransform:
m_ObjectHideFlags: 0
@ -101143,7 +101188,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ec0bc6b6d3f7fd044847aebc4ea31592, type: 3}
m_Name:
m_EditorClassIdentifier:
count: 0
count: 1
balance: {fileID: 1360804702}
intro_text: {fileID: 587456892}
surpluscount_text: {fileID: 1434357695}
Tourubtn: {fileID: 1594695428}
TimeText: {fileID: 1716546489}
Fishing: {fileID: 99292841}
--- !u!1 &1073869858
GameObject:
m_ObjectHideFlags: 0
@ -103461,6 +103512,83 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1100736960}
m_CullTransparentMesh: 1
--- !u!1 &1101304899
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1101304900}
- component: {fileID: 1101304902}
- component: {fileID: 1101304901}
m_Layer: 5
m_Name: daojishi
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1101304900
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101304899}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1716546488}
m_Father: {fileID: 1544898928}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -266}
m_SizeDelta: {x: 763.4908, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1101304901
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101304899}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fc36952022af4a042ac094f7fed9b017, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1101304902
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101304899}
m_CullTransparentMesh: 1
--- !u!1 &1103599566
GameObject:
m_ObjectHideFlags: 0
@ -127540,35 +127668,35 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchoredPosition.x
value: 284
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchoredPosition.y
value: -43
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchoredPosition.x
value: 428
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_AnchoredPosition.y
value: -43
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4284489242025471100, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
propertyPath: m_IsActive
@ -127601,6 +127729,17 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 4284489241738703987, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
m_PrefabInstance: {fileID: 1360804700}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1360804702 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4284489241406162018, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
m_PrefabInstance: {fileID: 1360804700}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1360971595
GameObject:
m_ObjectHideFlags: 0
@ -144358,6 +144497,7 @@ RectTransform:
- {fileID: 847345530}
- {fileID: 1722191221}
- {fileID: 109792510}
- {fileID: 1101304900}
m_Father: {fileID: 1073200880}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -162239,6 +162379,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1715483371}
m_CullTransparentMesh: 1
--- !u!1 &1716546487
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1716546488}
- component: {fileID: 1716546490}
- component: {fileID: 1716546489}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1716546488
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1716546487}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1101304900}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 468.5312, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1716546489
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1716546487}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u667A\u6167\u7684\u963F\u91CC\u9493\u5230\u4E00\u76F4\u8D85\u7EA7\u5927\u9C7C"
--- !u!222 &1716546490
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1716546487}
m_CullTransparentMesh: 1
--- !u!1 &1716889737
GameObject:
m_ObjectHideFlags: 0

View File

@ -7,19 +7,33 @@ public class mengyaoInfo
{
public string id;
public Sprite imge;
public Sprite cardimge;
public GameObject prefab;
public GameObject cardprefab;
}
public class MY_Infos : MonoBehaviour
{
public List<mengyaoInfo> mengyaoItems=new List<mengyaoInfo>();
public Dictionary<string, mengyaoInfo> mengyaoItemsDic=new Dictionary<string, mengyaoInfo>();
public MY_Infos instane;
public static MY_Infos instane;
void Awake()
{
instane = this;
foreach (mengyaoInfo value in mengyaoItems)
{
mengyaoItemsDic.Add(value.id,value);
}
}
public mengyaoInfo GetMY(string id)
{
mengyaoInfo temp=null;
mengyaoItemsDic.TryGetValue(id,out temp);
return temp;
}
}

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using System.Threading.Tasks;
using UnityEngine.Rendering;
public class SpawnMonster : Base
@ -14,6 +14,19 @@ public class SpawnMonster : Base
[Header("临时索引")]
private int index=1;
public int Index
{
get => index;
set
{
index=value;
StartSpawning();
}
}
public List<GameObject> enemysList=new List<GameObject>();
private void Awake()
@ -25,16 +38,16 @@ public class SpawnMonster : Base
{
Base.GlobalObj.GetComponent<gameGlobal>().OnGamePlay += this.StartSpawning;
StartSpawning();
//StartSpawning();
}
/*public void UpdateNodeList()
public void UpdateNodeList()
{
// 获取所有带有 SortingGroup 组件的敌人对象
List<GameObject> gameObjectsList = new List<GameObject>();
foreach (GameObject go in Enemys)
foreach (GameObject go in enemysList)
{
// 获取该物体上的 SortingGroup 组件
if (go != null)
@ -70,13 +83,13 @@ public class SpawnMonster : Base
}
}
}
}*/
}
void Update()
{
// UpdateNodeList();
UpdateNodeList();
}

View File

@ -28,7 +28,18 @@ public class UIContorl : Base
}
}
public Text KIllNumberText;
public int maxEnemynumber;
private int maxEnemynumber;
public int MaxEnemynumber
{
get => maxEnemynumber;
set
{
maxEnemynumber = value;
Debug.Log("maxEnemynumber:" + maxEnemynumber);
this.KIllNumberText.text = killnumber + "/" + maxEnemynumber;
}
}
private int killnumber;
public int Killnumber
{
@ -57,10 +68,15 @@ public class UIContorl : Base
private float timeElapsed = 0f; // 记录经过的时间
private bool isTimerRunning = false; // 控制计时器是否运行
// Start is called before the first frame update
void Start()
void Awake()
{
if (instance != null) return;
instance = this;
}
void Start()
{
//FightBtn.onClick.AddListener(FightClick);
Battle_Time.text = "00:00";

View File

@ -4,15 +4,6 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[System.Serializable]
public class MengyaoCardData
{
[Tooltip("萌妖卡ID")]
public string cardID;
[Tooltip("萌妖卡预制体")]
public GameObject cardPrefab;
}
public class cardBox : Base
{
@ -23,7 +14,7 @@ public class cardBox : Base
[Header("怪物信息提示按钮obj")] public GameObject IconTipObj;
[Header("萌妖卡数据列表")] public List<MengyaoCardData> mengyaoCardDataList = new List<MengyaoCardData>();
// [Header("萌妖卡数据列表")] public List<MengyaoCardData> mengyaoCardDataList = new List<MengyaoCardData>();
[Header("萌妖卡生成父节点")] public Transform parentPos;
@ -54,8 +45,6 @@ public class cardBox : Base
}
btnObj.SetActive(false);
InitializeDictionary();
Init();
mengyaoNumber = Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Count;
}
@ -77,47 +66,7 @@ public class cardBox : Base
}
}
/// <summary>
/// 初始化ID到萌妖卡预制体的映射字典
/// </summary>
void InitializeDictionary()
{
foreach (var cardData in mengyaoCardDataList)
{
string id = cardData.cardID;
GameObject prefab = cardData.cardPrefab;
// 检查ID和预制体是否为空
if (string.IsNullOrEmpty(id))
{
Debug.LogWarning("萌妖卡ID为空跳过该条数据");
continue;
}
if (prefab == null)
{
Debug.LogWarning($"萌妖卡ID '{id}' 对应的预制体为空,跳过该条数据!");
continue;
}
// 检查ID是否重复
if (IDTomangyaoPrefab.ContainsKey(id))
{
Debug.LogWarning($"萌妖卡ID '{id}' 在字典中已经存在,预制体将被忽略。");
continue;
}
// 添加到字典
IDTomangyaoPrefab.Add(id, prefab);
}
// 测试输出
foreach (var kvp in IDTomangyaoPrefab)
{
Debug.Log($"初始化字典 - ID: {kvp.Key}, Prefab: {kvp.Value.name}");
}
}
/// <summary>
/// 根据CarryCardId列表生成对应的萌妖卡牌
/// </summary>
@ -128,10 +77,12 @@ public class cardBox : Base
foreach (string id in carryCardIdList)
{
if (IDTomangyaoPrefab.TryGetValue(id, out GameObject prefab))
mengyaoInfo info= MY_Infos.instane.GetMY(id);
if (info != null)
{
// 实例化预制体,设置父节点为 parentPos
GameObject card = Instantiate(prefab, parentPos);
GameObject card = Instantiate(info.cardprefab, parentPos);
//card.GetComponent<enemy>().enemyId = id;
//this.card.Add(card);
// 确保卡牌的缩放为0准备进行放大动画
@ -142,10 +93,6 @@ public class cardBox : Base
// 播放放大动画
card.transform.DOScale(Vector3.one, scaleUpDuration).SetEase(Ease.OutBack);
}
else
{
Debug.LogWarning($"未找到ID为 '{id}' 的萌妖卡预制体!");
}
}
}

View File

@ -85,7 +85,9 @@ public class cardContorl : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndD
MengyaoInfo.Instance.mengyaoIdToRole.Add(mY.GetComponent<Role>().id, mY);
SpawnPool.intance.Enemys.Add(mY);//存入图层排序的数组
//SpawnPool.intance.Enemys.Add(mY);//存入图层排序的数组
this.enabled = false;
cardBox.instance.ChangeInPlaceNumber(1);
mask.SetActive(true);

View File

@ -35,7 +35,7 @@ public class gameGlobal : Base
/// </summary>
public static void GamePlay()
{
Debug.Log("ÓÎÏ·¿ªÊ¼");
Debug.LogError("ÓÎÏ·¿ªÊ¼");
Base.GlobalObj.GetComponent<gameGlobal>().OnGamePlay?.Invoke();
}

View File

@ -8,10 +8,27 @@ public class MapLevelJsonRead : JsonReadBase
public List<Wave> waves;
public TextAsset MapLevelJson;
public int count = 0;
void Awake()
{
instance=this;
instance = this;
waves = base.LoadJson<Wave>(MapLevelJson);
}
void Start()
{
foreach (Wave value in waves)
{
count += value.enemies.Count;
Debug.Log("一个:" + value.enemies.Count);
}
Debug.Log("总:" + this.count);
UIContorl.instance.MaxEnemynumber = this.count;
}
}
@ -29,5 +46,4 @@ public struct Wave
public int spawnPoint; // 生成点
public List<maplevel_enemy> enemies; // 敌人列表
public int totalReward; // 总奖励
}
}

View File

@ -6,31 +6,51 @@ using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using Newtonsoft.Json;
using UnityEngine.UI;
using System.Net;
using System.Reflection;
public class WebJoinroom : MonoBehaviour
{
private ClientWebSocket _webSocket;
private const string WebSocketUri = "ws://47.95.201.243:9527/api/ws";
private const string AuthorizationValue = "Bearer VH8XwWuu_iVjEPYQmCq1E2rITTg";
private string AuthorizationValue;
public int count = 0;
//界面元素
public Text balance;
public Text intro_text;
public Text surpluscount_text;
public Button Tourubtn;
private float lastCallTime = 0f;
float remainingTime = 0f;
public Text TimeText;
private float interval = 1f; // 每秒调用一次
public Button Fishing;
FishJoinroomData fishJoinroomData;
private async void Start()
{
TimeText.gameObject.transform.parent.gameObject.SetActive(false);
Debug.Log(PlayerPrefs.GetString("UserToken"));
AuthorizationValue = PlayerPrefs.GetString("UserToken");
await ConnectWebSocket();
// 准备 JSON 数据
var message = new
Tourubtn.onClick.AddListener(async () =>
{
code = "FISHING",
content = "{\\\"action\\\":\\\"INFO\\\"}"
};
await SendJsonMessage(1);
});
Fishing.onClick.AddListener(() =>
{
// 将对象序列化为 JSON 字符串
string jsonMessage = JsonUtility.ToJson(message);
fish();
});
// 调用发送方法
await SendJsonMessage("{ \"code\": \"FISHING\", \"content\": \"{\\\"action\\\":\\\"INFO\\\"}\" }");
await SendJsonMessage(count);
await SendJsonMessage("{ \"code\": \"FISHING\", \"content\": \"{\\\"action\\\":\\\"FISHING\\\"}\" }");
//await SendJsonMessage("{ \"code\": \"FISHING\", \"content\": \"{\\\"action\\\":\\\"FISHING\\\"}\" }");
//await SendJsonMessage("{\"code\": \"BALANCE\"}");
}
private async Task ConnectWebSocket()
@ -38,7 +58,8 @@ public class WebJoinroom : MonoBehaviour
_webSocket = new ClientWebSocket();
// 添加 Authorization 头
_webSocket.Options.SetRequestHeader("Authorization", AuthorizationValue);
_webSocket.Options.SetRequestHeader("Authorization", "Bearer "+ AuthorizationValue);
// _webSocket.Options.SetRequestHeader("client-info",);
try
{
@ -76,7 +97,7 @@ public class WebJoinroom : MonoBehaviour
Debug.Log($"接收到消息:{message}");
var baseResponse = JsonConvert.DeserializeObject<BaseResponse>(message);
Promptmgr.Instance.PromptBubble(baseResponse.message);
if (baseResponse != null)
{
switch (baseResponse.code)
@ -85,15 +106,20 @@ public class WebJoinroom : MonoBehaviour
case "FISHING_INFO":
// 解析为 FishJoinroomresponse 类型
FishJoinroomresponse fishResponse = JsonConvert.DeserializeObject<FishJoinroomresponse>(message);
fishJoinroomData= fishResponse.data;
if (fishResponse?.data != null)
{
disbalance(fishResponse.data.balance);
Debug.Log($"余额: {fishResponse.data.balance}");
Debug.Log($"价格: {fishResponse.data.price}");
dissurplus(fishResponse.data.surplus_count, fishResponse.data.price);
count = fishResponse.data.surplus_count;
Debug.Log($"剩余数量: {fishResponse.data.surplus_count}");
intro_text.text = fishResponse.data.intro_text;
Debug.Log($"玩法介绍: {fishResponse.data.intro_text}");
foreach (var item in fishResponse.data.items)
{
Debug.Log($"物品ID: {item.id}, 物品名称: {item.name}, 类型: {item.type}");
Debug.Log($"物品ID: {item.id}, 物品名称: {item.name}, {item.grade}{item.intro}");
}
}
break;
@ -105,8 +131,11 @@ public class WebJoinroom : MonoBehaviour
// 检查是否成功反序列化
if (fishResponse1 != null && fishResponse1.data != null)
{
disbalance(fishResponse1.data.balance);
Debug.Log($"余额: {fishResponse1.data.balance}");
Debug.Log($"价格: {fishResponse1.data.price}");
count = fishResponse1.data.surplus_count;
dissurplus(fishResponse1.data.surplus_count, fishResponse1.data.price);
Debug.Log($"剩余数量: {fishResponse1.data.surplus_count}");
}
else
@ -122,17 +151,30 @@ public class WebJoinroom : MonoBehaviour
// 检查是否成功反序列化
if (fishResponse2 != null && fishResponse2.data != null)
{
disbalance(fishResponse2.data.balance);
Debug.Log($"余额: {fishResponse2.data.balance}");
Debug.Log($"价格: {fishResponse2.data.price}");
dissurplus(fishResponse2.data.surplus_count, fishResponse2.data.price);
count = fishResponse2.data.surplus_count;
Debug.Log($"剩余数量: {fishResponse2.data.surplus_count}");
Debug.Log($"余额: {fishResponse2.data.prize.id}");
Debug.Log($"余额: {fishResponse2.data.prize.name}");
Debug.Log($"余额: {fishResponse2.data.prize.type}");
foreach(var item in fishJoinroomData.items)
{
if(fishResponse2.data.prize.id==item.id)
{
Promptmgr.Instance.PromptBubble(item.intro);
}
}
}
else
{
Debug.LogWarning("收到的消息无法解析为 Fishresponse 对象。");
}
break;
case "BALANCE":
break;
}
}
@ -147,6 +189,25 @@ public class WebJoinroom : MonoBehaviour
Debug.LogError($"接收消息时出错:{e.Message}");
}
}
public async void fish()
{
TimeText.gameObject.transform.parent.gameObject.SetActive(true); remainingTime = 5f;
// 生成一个随机时间,假设在 1 到 5 秒之间
float randomDelay = UnityEngine.Random.Range(1f, 5f);
// 延迟随机时间
await Task.Delay(TimeSpan.FromSeconds(randomDelay));
// 延迟结束后发送消息
await SendJsonMessage("{ \"code\": \"FISHING\", \"content\": \"{\\\"action\\\":\\\"FISHING\\\"}\" }");
TimeText.gameObject.transform.parent.gameObject.SetActive(false); remainingTime = 0f;
Debug.Log("消息已发送");
if(count>=1)
{
fish();
}
}
public async Task SendJsonMessage(int count)
{
@ -208,6 +269,51 @@ public class WebJoinroom : MonoBehaviour
Debug.Log("WebSocket 连接已关闭。");
}
}
public void disbalance(float detail)
{
balance.text=detail.ToString();
}
public void dissurplus(float detail,int p)
{
surpluscount_text.text = (p*(int)detail).ToString()+"金币";
}
void UpdateCountdownText(float remainingTime)
{
// 将剩余时间转换为小时、分钟和秒
int hours = Mathf.FloorToInt(remainingTime / 3600);
int minutes = Mathf.FloorToInt((remainingTime % 3600) / 60);
int seconds = Mathf.FloorToInt(remainingTime % 60);
// 使用格式化字符串显示倒计时00:00:00
TimeText.text = string.Format("{0:D2}:{1:D2}:{2:D2}", hours, minutes, seconds);
}
private void Update()
{
if (Time.time - lastCallTime >= interval)
{
// 每秒调用一次的代码
if (remainingTime > 0)
{
remainingTime -= 1;
UpdateCountdownText(remainingTime);
Debug.Log("进入倒计时");
}
if (remainingTime <= 0)
{
TimeText.gameObject.transform.parent.gameObject.SetActive(false);
}
// 更新上次调用时间
lastCallTime = Time.time;
}
}
}
public class BaseResponse
{
@ -235,7 +341,8 @@ public class FishJoinroom
{
public int id { get; set; }
public string name { get; set; }
public int type { get; set; }
public int grade { get; set; }
public string intro { get; set; }
}
public class Fishingresponse
{