同步进度
This commit is contained in:
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: a263e71fce79f2f4cb5b5f1fa6b7291a
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: 150bfecf928b5ccc71e9467930792a70
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_BundleLocalCatalog: 0
|
||||
@@ -44,6 +44,8 @@ MonoBehaviour:
|
||||
m_BuildAddressablesWithPlayerBuild: 0
|
||||
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
|
||||
m_GroupAssets:
|
||||
- {fileID: 11400000, guid: 21c8685877ee80140aa2b6cdd9511d93, type: 2}
|
||||
- {fileID: 11400000, guid: ca4eb1ed7a9a8bc4bbcc5d865fd723a4, type: 2}
|
||||
- {fileID: 11400000, guid: ec57fb26f5bb61544b2831e9485b32fe, type: 2}
|
||||
- {fileID: 11400000, guid: a0634190ffe18f540898ca188e9239a6, type: 2}
|
||||
m_BuildSettings:
|
||||
@@ -67,6 +69,20 @@ MonoBehaviour:
|
||||
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
|
||||
- m_Id: c39dcac55ca57cd4bae683f499239bab
|
||||
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
|
||||
- m_InheritedParent:
|
||||
m_Id: b7f47c35cd1348d4791d756b5dd574c7
|
||||
m_ProfileName: XJMHFishPrefabs
|
||||
m_Values:
|
||||
- m_Id: 2ada5ea4c995904498bf2d2905ef9b81
|
||||
m_Value: ServerData/[BuildTarget]
|
||||
- m_Id: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
- m_Id: 6e73997731c000940a437485b1ba76c4
|
||||
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
|
||||
- m_Id: c39dcac55ca57cd4bae683f499239bab
|
||||
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
|
||||
m_ProfileEntryNames:
|
||||
- m_Id: 2ada5ea4c995904498bf2d2905ef9b81
|
||||
m_Name: Remote.BuildPath
|
||||
@@ -87,6 +103,8 @@ MonoBehaviour:
|
||||
m_LabelTable:
|
||||
m_LabelNames:
|
||||
- default
|
||||
- FishPrefab
|
||||
- MoveLine
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: f8bdd136efb211442bda19725e55eefa, type: 2}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 684e2853ed04e824a9831cdcc9ceb3e5
|
||||
guid: ea53c934e0cad244eb4035158329d110
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -22,6 +22,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 26f68c48bf8dba74dba3fe7f38ae6e60
|
||||
m_Address: XJMHCreateFish.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2ae29ff90f8f1ba42aafd95293932c59
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/ServicePanel.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -47,11 +52,6 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 54c78f3d5bef70f4b82494abe09d3946
|
||||
m_Address: MoveLines
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 62bda8aec1cfb1749aadcfe3ef48ee05
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/MonthCardPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -67,6 +67,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 98d405c628d99d3438556c9c6584a9a6
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/ZSPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 996a064fe66064f4bb15d7927689865d
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/SelectRoomPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -77,6 +82,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: aab7adfb6126f094f8860d975314558b
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/TurretPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c48b9e15c1940764a9da95551887a147
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/BackPack.prefab
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
|
||||
m_Name: Fish_XJMH
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: Fish_XJMH
|
||||
m_Data:
|
||||
m_SerializedData: []
|
||||
m_GUID: 6d532a2d8ca07bc4396aa532c3f91915
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 009a2f0c9edbec543a29cacf9fc37b73
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_112.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 06650f99f49be5544a77894c7578c3b7
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_108.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0878ad27fe6c4954bb2c98239d064a70
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_31.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0ec0fdb9b47252e4d8e2a853d4ab27ab
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_5.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0f51cec0ce53c3045886966249bbb645
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_110.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 17f00288720a94a4abda06b1fdaa8776
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_7.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 32a2a3425e0034f4ab476a89aa7186e6
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_105.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 35c0248e99845184a95c7b7c99aea0f1
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_101.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3c361fb6838b59a40b183bc1dbf9ae2a
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_2.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 41afd15494bfe1c4481a167f8cc6f8fd
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_106.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 421c94b20dbcc17429441e1c0b2dbc3d
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_114.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 44623ca91d5f59049b506c55c76f2aef
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_4000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 46cc224b052576a48969676d6ed0b722
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_32.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4c1fab242d8e40c4483293cbbaef7d15
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_2000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 65e6cfdf79b7d724e85b3d3b34f48042
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_102.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 68e9db06ce8a52043bce8e20dd84fb7e
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_9.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 75d387735e7c6cb4d806a8603178a855
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_3000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 9a0f98ba992183c48b8412576ab5f9e8
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_6000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a349ebe73e53cca4c917b05e60d57364
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_1000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: bc69610e44c0e75448d1cf9db8437e19
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_109.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c2fdcae6c382df045abf9a8eaa9c3ee3
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_111.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c7f5b46067182f14881d77058962bf00
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_107.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d41f4c61f118c5d40aeae3131a910033
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_113.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d56dbe2272bf3974eb895a095135426a
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_4.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d6d92c8bd8ebbcf4f8cd7a367eba0813
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_8.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: dc96b58c5624d4a4c81915c1a96c1d2e
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_5000.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e4dfda15f9a3d6d49aa2ac2776573b22
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_3.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e62dc614a001da846b826cbb8af8bdc3
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_6.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e8d23a063b8dc9f488982364ae670d15
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_104.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ee35afcac440de847895378c1205bc6c
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_103.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f31b8202686e8d24bb973f885c2fa7bd
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_1.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f489072a59ee7124cacd935b8dccef7b
|
||||
m_Address: Assets/Art/XJMH/pw/pw_prefab/game/enemy/XJMHEnemy/PW_Enemy_115.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- FishPrefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas:
|
||||
- {fileID: 11400000, guid: 349ff2de92c8cd241ae7c1c9ccedb277, type: 2}
|
||||
- {fileID: 11400000, guid: 02c4079457d697a4299e6f8ddd3e8acf, type: 2}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea4782bf6b2c7b04699ba2ce48888128
|
||||
guid: ca4eb1ed7a9a8bc4bbcc5d865fd723a4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
|
||||
m_Name: MoveLines_XJMH
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: MoveLines_XJMH
|
||||
m_Data:
|
||||
m_SerializedData: []
|
||||
m_GUID: 0c404f8d340af164cb9b304a82f915aa
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 54c78f3d5bef70f4b82494abe09d3946
|
||||
m_Address: MoveLines
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- MoveLine
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 656562b8f23e77a4095e1ebee346acbb
|
||||
m_Address: Assets/MyGame/aa/Game/GameMoveLine/2222.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- MoveLine
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 96de7257cb770804a9c8a72b02912135
|
||||
m_Address: Assets/MyGame/aa/Game/GameMoveLine/3333.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- MoveLine
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas:
|
||||
- {fileID: 11400000, guid: d26558160b115ab418350ac74e9f5752, type: 2}
|
||||
- {fileID: 11400000, guid: 39a9571326254d3448a3b4c940c25cc6, type: 2}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15eae88574635a3479dbbcb9b5032efa
|
||||
guid: 21c8685877ee80140aa2b6cdd9511d93
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
|
||||
m_Name: Fish_XJMH_BundledAssetGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
m_Group: {fileID: 11400000, guid: ca4eb1ed7a9a8bc4bbcc5d865fd723a4, type: 2}
|
||||
m_InternalBundleIdMode: 1
|
||||
m_Compression: 1
|
||||
m_IncludeAddressInCatalog: 1
|
||||
m_IncludeGUIDInCatalog: 1
|
||||
m_IncludeLabelsInCatalog: 1
|
||||
m_InternalIdNamingMode: 0
|
||||
m_CacheClearBehavior: 0
|
||||
m_IncludeInBuild: 1
|
||||
m_BundledAssetProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
|
||||
m_ForceUniqueProvider: 0
|
||||
m_UseAssetBundleCache: 1
|
||||
m_UseAssetBundleCrc: 1
|
||||
m_UseAssetBundleCrcForCachedBundles: 1
|
||||
m_UseUWRForLocalBundles: 0
|
||||
m_Timeout: 0
|
||||
m_ChunkedTransfer: 0
|
||||
m_RedirectLimit: -1
|
||||
m_RetryCount: 0
|
||||
m_BuildPath:
|
||||
m_Id: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_LoadPath:
|
||||
m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
m_BundleMode: 0
|
||||
m_AssetBundleProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
|
||||
m_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1d6484a58fa5e246932c371d100e42f
|
||||
guid: 349ff2de92c8cd241ae7c1c9ccedb277
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
+4
-5
@@ -9,9 +9,8 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
|
||||
m_Name: zhuyeUI1_Atlas
|
||||
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
|
||||
m_Name: Fish_XJMH_ContentUpdateGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
atlasFile: {fileID: 4900000, guid: 492ccae28fb7d0a4dad43518c0a6d0fb, type: 3}
|
||||
materials:
|
||||
- {fileID: 2100000, guid: dbf0f9f70084d864eb66845ea2de05d3, type: 2}
|
||||
m_Group: {fileID: 11400000, guid: ca4eb1ed7a9a8bc4bbcc5d865fd723a4, type: 2}
|
||||
m_StaticContent: 0
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35f61f395a1038a4fb993bd0e69a7c5a
|
||||
guid: 02c4079457d697a4299e6f8ddd3e8acf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
|
||||
m_Name: MoveLines_XJMH_BundledAssetGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
m_Group: {fileID: 11400000, guid: 21c8685877ee80140aa2b6cdd9511d93, type: 2}
|
||||
m_InternalBundleIdMode: 1
|
||||
m_Compression: 1
|
||||
m_IncludeAddressInCatalog: 1
|
||||
m_IncludeGUIDInCatalog: 1
|
||||
m_IncludeLabelsInCatalog: 1
|
||||
m_InternalIdNamingMode: 0
|
||||
m_CacheClearBehavior: 0
|
||||
m_IncludeInBuild: 1
|
||||
m_BundledAssetProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
|
||||
m_ForceUniqueProvider: 0
|
||||
m_UseAssetBundleCache: 1
|
||||
m_UseAssetBundleCrc: 1
|
||||
m_UseAssetBundleCrcForCachedBundles: 1
|
||||
m_UseUWRForLocalBundles: 0
|
||||
m_Timeout: 0
|
||||
m_ChunkedTransfer: 0
|
||||
m_RedirectLimit: -1
|
||||
m_RetryCount: 0
|
||||
m_BuildPath:
|
||||
m_Id: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_LoadPath:
|
||||
m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
m_BundleMode: 0
|
||||
m_AssetBundleProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
|
||||
m_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d26558160b115ab418350ac74e9f5752
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+4
-5
@@ -9,9 +9,8 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
|
||||
m_Name: zhuyeUI2_Atlas
|
||||
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
|
||||
m_Name: MoveLines_XJMH_ContentUpdateGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
atlasFile: {fileID: 4900000, guid: 6f36b790a35bcde4aa4104e1f4841f15, type: 3}
|
||||
materials:
|
||||
- {fileID: 2100000, guid: c10167b3e0966164dae40d11342c374d, type: 2}
|
||||
m_Group: {fileID: 11400000, guid: 21c8685877ee80140aa2b6cdd9511d93, type: 2}
|
||||
m_StaticContent: 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39a9571326254d3448a3b4c940c25cc6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a892028fd84e77340bc00bbc54f8b000
|
||||
guid: d74fb167e3f2c9f4892e944235780644
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Device;
|
||||
using Screen = UnityEngine.Screen;
|
||||
|
||||
public static class CoordinateTransformation
|
||||
{
|
||||
public static Vector3 CanvasToWorld(Vector2 canvasPos, RectTransform canvas, Camera cam)
|
||||
{
|
||||
// 1. 获取 Canvas 实际像素尺寸(自动适配所有设备)
|
||||
float canvasWidth = canvas.rect.width;
|
||||
float canvasHeight = canvas.rect.height;
|
||||
|
||||
// 2. 正交相机的世界高度
|
||||
float worldHeight = cam.orthographicSize * 2f;
|
||||
|
||||
// 3. 世界宽度 = 世界高度 * 屏幕宽高比
|
||||
float worldWidth = worldHeight * cam.aspect;
|
||||
|
||||
// 4. 画布单位 → 世界单位比例(横竖一致)
|
||||
float scaleX = worldWidth / canvasWidth;
|
||||
float scaleY = worldHeight / canvasHeight;
|
||||
|
||||
// 5. 你的 canvasPos 是以中心为原点的坐标
|
||||
float worldX = canvasPos.x * scaleX;
|
||||
float worldY = canvasPos.y * scaleY;
|
||||
|
||||
// 6. 映射到世界 z = 0 平面
|
||||
return new Vector3(worldX, worldY, 0f);
|
||||
}
|
||||
/// <summary>
|
||||
/// 从子坐标转换成总父canvas坐标
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
/// <param name="canvas"></param>
|
||||
/// <returns></returns>
|
||||
public static Vector2 AnchoredPos_ToCanvas(RectTransform target, Canvas canvas)
|
||||
{
|
||||
// 1. 先把 anchoredPosition(父坐标)转换成世界坐标
|
||||
Vector3 worldPos = target.TransformPoint(target.anchoredPosition);
|
||||
|
||||
// 2. 再把世界坐标转换成 Canvas 的局部坐标(等价于 Canvas 下的 anchoredPosition)
|
||||
RectTransform canvasRT = canvas.GetComponent<RectTransform>();
|
||||
|
||||
Vector2 canvasLocalPos;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||
canvasRT,
|
||||
RectTransformUtility.WorldToScreenPoint(canvas.worldCamera, worldPos),
|
||||
canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera,
|
||||
out canvasLocalPos
|
||||
);
|
||||
|
||||
return canvasLocalPos;
|
||||
}
|
||||
public static Vector3 ScreenToWord(Vector3 screenVector3)
|
||||
{
|
||||
return Camera.main.ScreenToWorldPoint(screenVector3);
|
||||
}
|
||||
public static Vector3 ScreenToCamera(Vector3 screenPos,Camera cam=null)
|
||||
{
|
||||
float targetZ = 0;
|
||||
if (cam==null)
|
||||
{
|
||||
cam=Camera.main;
|
||||
}
|
||||
// 1. 屏幕左下角原点 → 屏幕中心原点
|
||||
float cx = screenPos.x - Screen.width * 0.5f;
|
||||
float cy = screenPos.y - Screen.height * 0.5f;
|
||||
|
||||
// 2. 屏幕中心原点 → Unity 标准屏幕坐标(左下角原点)
|
||||
float ux = cx + Screen.width * 0.5f;
|
||||
float uy = cy + Screen.height * 0.5f;
|
||||
|
||||
// 3. 屏幕 → 世界
|
||||
float distance = Mathf.Abs(cam.transform.position.z - targetZ);
|
||||
Vector3 worldPos = cam.ScreenToWorldPoint(new Vector3(ux, uy, distance));
|
||||
worldPos.z = targetZ;
|
||||
|
||||
// 4. 世界 → 相机坐标(相机中心为原点)
|
||||
float worldHeight = cam.orthographicSize;
|
||||
|
||||
return cam.transform.InverseTransformPoint(worldPos);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88a585a55ecbd404fbb33a54beef9d83
|
||||
guid: bf0db1470318abc41bf6af07f8f9918b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -0,0 +1,92 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public enum AudioType
|
||||
{
|
||||
None,
|
||||
BG,
|
||||
FX,
|
||||
|
||||
}
|
||||
public class AudioManager : Singleton<AudioManager>
|
||||
{
|
||||
public bool nan;
|
||||
Dictionary<AudioType,AudioSource> dic_audioList=new Dictionary<AudioType, AudioSource> ();
|
||||
public AudioMixer audioMixer;
|
||||
//public AudioMixer mixer;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
var v = UIManager.Instance.transform.GetChild(0).GetComponents<AudioSource>();
|
||||
dic_audioList.Add(AudioType.BG, v[0]);
|
||||
dic_audioList.Add(AudioType.FX, v[1]);
|
||||
int a = PlayerPrefs.GetInt("first");
|
||||
if (a==0)
|
||||
{
|
||||
PlayerPrefs.SetFloat("slider_AudioBG",1f);
|
||||
PlayerPrefs.SetFloat("slider_FX", 1f);
|
||||
PlayerPrefs.SetInt("first",1);
|
||||
|
||||
}
|
||||
float value = PlayerPrefs.GetFloat("slider_AudioBG");
|
||||
audioMixer.SetFloat("BGVolume", value * 100 - 80);
|
||||
|
||||
value = PlayerPrefs.GetFloat("slider_FX");
|
||||
audioMixer.SetFloat("FXVolume", value*100-80);
|
||||
dic_audioList[AudioType.BG].outputAudioMixerGroup = audioMixer.FindMatchingGroups("Master/BG")[0];
|
||||
dic_audioList[AudioType.FX].outputAudioMixerGroup = audioMixer.FindMatchingGroups("Master/FX")[0];
|
||||
}
|
||||
public AudioSource GetAudioSource(AudioType audioType)
|
||||
{
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
return dic_audioList[audioType];
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
}
|
||||
public void ChangeBG(AudioClip audioClip)
|
||||
{
|
||||
AudioType audioType=AudioType.BG;
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
dic_audioList[audioType].clip = audioClip;
|
||||
dic_audioList[audioType].Play();
|
||||
|
||||
}
|
||||
}
|
||||
public void PlayFX(AudioClip audioClip)
|
||||
{
|
||||
AudioType audioType = AudioType.FX;
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
dic_audioList[audioType].PlayOneShot(audioClip);
|
||||
|
||||
}
|
||||
}
|
||||
public bool UpdateAudioClip(AudioType audioType,AudioClip audioClip)
|
||||
{
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
dic_audioList[audioType].clip=audioClip;
|
||||
dic_audioList[audioType].Play();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool PlayOneShot(AudioType audioType, AudioClip audioClip)
|
||||
{
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
dic_audioList[audioType].PlayOneShot(audioClip);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b6274f58a6279d48ad7b7045f1d80e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -13,7 +13,10 @@ public class SubUIManager
|
||||
private readonly Transform parent;
|
||||
private readonly Dictionary<UIPanel, SubUIBase> panels = new Dictionary<UIPanel, SubUIBase>();
|
||||
private readonly Dictionary<UIPanel, string> addressMap = new Dictionary<UIPanel, string>();
|
||||
|
||||
public T Get<T>(UIPanel type) where T : UIBase
|
||||
{
|
||||
return panels.TryGetValue(type, out var panel) ? panel as T : null;
|
||||
}
|
||||
public SubUIManager(Transform parent, UIPanelAddressConfig uIPanelAddressConfig)
|
||||
{
|
||||
this.parent = parent;
|
||||
|
||||
@@ -6,9 +6,12 @@ using Unity.VisualScripting.FullSerializer;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using System.Net;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
//ui面板枚举 这里要求分类 Main *00 *00-*99 整数为主界面尾数为子界面
|
||||
public enum UIPanel
|
||||
{
|
||||
None=9999,
|
||||
LoginPanel = 0,
|
||||
HomeMainPanel = 1,
|
||||
MainGamePanelDefault = 2,
|
||||
@@ -131,6 +134,42 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
{
|
||||
return StartCoroutine(CoShow(type, args, onShown));
|
||||
}
|
||||
public GameObject BoardPanelParefab;
|
||||
public void ShowBoard(string str)
|
||||
{
|
||||
|
||||
StartCoroutine(IEShowBoard(str));
|
||||
|
||||
}
|
||||
IEnumerator IEShowBoard(string str)
|
||||
{
|
||||
var obj = Instantiate(BoardPanelParefab, uiRoot);
|
||||
obj.transform.SetAsLastSibling();
|
||||
obj.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = str;
|
||||
yield return new WaitForSeconds(1);
|
||||
float a = 1;
|
||||
Color c;
|
||||
TextMeshProUGUI t = obj.transform.GetChild(0).GetComponent<TextMeshProUGUI>();
|
||||
Image i = obj.GetComponent<Image>();
|
||||
while (true)
|
||||
{
|
||||
a-=Time.deltaTime;
|
||||
yield return null;
|
||||
c = i.color;
|
||||
c.a=a;
|
||||
i.color = c;
|
||||
|
||||
c = t.color;
|
||||
c.a = a;
|
||||
t.color = c;
|
||||
if (a<0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
Destroy(obj);
|
||||
|
||||
}
|
||||
private IEnumerator CoShow(UIPanel type, object args, Action<UIBase> onShown)
|
||||
{
|
||||
if (addressMap.ContainsKey(type))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,472 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &163220318
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 163220319}
|
||||
- component: {fileID: 163220321}
|
||||
- component: {fileID: 163220320}
|
||||
m_Layer: 0
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &163220319
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163220318}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.9603834, y: -5.1608257, z: 0.029651165}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 814180751}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &163220320
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163220318}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dbc0d2ec81371bb4cb0d11f2bdf2671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!212 &163220321
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163220318}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: -10
|
||||
m_Sprite: {fileID: 21300000, guid: b6785aa85707ef04c9d91eeb8e8e47b6, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 2}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &814180750
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 814180751}
|
||||
- component: {fileID: 814180752}
|
||||
m_Layer: 0
|
||||
m_Name: BG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &814180751
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 814180750}
|
||||
serializedVersion: 2
|
||||
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: 1115207331}
|
||||
- {fileID: 163220319}
|
||||
- {fileID: 1987591213}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &814180752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 814180750}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2b9ab2bdb337a1342bb39163aba2f3eb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
upV3: {x: 0, y: 0, z: 0}
|
||||
centerV3: {x: 0, y: 0, z: 0}
|
||||
downV3: {x: 0, y: 0, z: 0}
|
||||
speed: 10
|
||||
height: 0
|
||||
--- !u!1 &1115207330
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1115207331}
|
||||
- component: {fileID: 1115207333}
|
||||
- component: {fileID: 1115207332}
|
||||
m_Layer: 0
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1115207331
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1115207330}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.2387369, y: 7.610521, z: 0.029651165}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 814180751}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -1.81}
|
||||
--- !u!114 &1115207332
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1115207330}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dbc0d2ec81371bb4cb0d11f2bdf2671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!212 &1115207333
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1115207330}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: -10
|
||||
m_Sprite: {fileID: 21300000, guid: 4edb776afc795294687bdaaeeae320bf, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 2}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1987591212
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1987591213}
|
||||
- component: {fileID: 1987591215}
|
||||
- component: {fileID: 1987591214}
|
||||
m_Layer: 0
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1987591213
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987591212}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -3.2487369, y: -17.42948, z: 0.029651165}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 814180751}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1987591214
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987591212}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dbc0d2ec81371bb4cb0d11f2bdf2671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!212 &1987591215
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987591212}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: -10
|
||||
m_Sprite: {fileID: 21300000, guid: 8b4d9dbf75a7e204a97a8d37b81ed131, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 2}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 814180751}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99f6c33768a462a41ad185eeea8f64ad
|
||||
guid: 02c4548d2ee59d046afa19dee20d4153
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -0,0 +1,184 @@
|
||||
using Assets.MyGame.Scripts.Net.API.GameConfig_SubClass;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
|
||||
using Spine;
|
||||
using Spine.Unity;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using static MonsterMoveLine;
|
||||
|
||||
public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
public string hashCode;
|
||||
public MonsterDataBase monsterData = new MonsterDataBase(new MonsterHealthBase());
|
||||
public SkeletonAnimation skeleton;
|
||||
public bool isSpine = true;
|
||||
|
||||
public Dictionary<CharacterAnimationType, string> dic_AnimKeyAnimName = new Dictionary<CharacterAnimationType, string>();
|
||||
public CharacterStateType currState;
|
||||
public GameObject effect_Hurt;//遮罩闪烁
|
||||
public int HP = 5;
|
||||
public GameObject effect_Die;//删除
|
||||
GameObject hurt;
|
||||
public FishTypeEnum fishType=FishTypeEnum.普通鱼;
|
||||
//递归查找子物体
|
||||
Transform FindDeepChild(Transform parent, string name)
|
||||
{
|
||||
|
||||
foreach (Transform child in parent)
|
||||
{
|
||||
if (child.name == name)
|
||||
return child;
|
||||
var result = FindDeepChild(child, name);
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public void Init(BezierCurveData bezierCurveData, float Time, bool isyuzhen = false)
|
||||
{
|
||||
monsterData.moveLine.Init(bezierCurveData, 10);
|
||||
isyz = isyuzhen;
|
||||
if (bezierCurveData.start.y>0)
|
||||
{
|
||||
transform.Rotate(Vector3.forward * 180);
|
||||
}
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
var t = FindDeepChild(transform,"HitEffect");
|
||||
if (t!=null)
|
||||
{
|
||||
hurt = t.gameObject;
|
||||
hurt.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
||||
public void OnHurt()
|
||||
{
|
||||
if (hurt!=null)
|
||||
{
|
||||
StartCoroutine(Hurt());
|
||||
}
|
||||
}
|
||||
//受击闪烁
|
||||
IEnumerator Hurt()
|
||||
{
|
||||
hurt.SetActive(true);
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
hurt.SetActive(false);
|
||||
}
|
||||
public void InitAnimList()
|
||||
{
|
||||
dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
|
||||
}
|
||||
//这里捕鱼的结构很简单可以穿模直接写移动
|
||||
void Update()
|
||||
{
|
||||
OnUpdate(currState);
|
||||
}
|
||||
public void Start()
|
||||
{
|
||||
InitAnimList();
|
||||
ChangeState(CharacterStateType.move);
|
||||
}
|
||||
public virtual void OnMoveEnter()
|
||||
{
|
||||
PlayAnim(CharacterAnimationType.move);
|
||||
//播放动画
|
||||
//skeleton.AnimationState.SetAnimation(0, dic_AnimKeyAnimName[CharacterAnimationType.move], true);
|
||||
}
|
||||
public virtual void OnMoveExit()
|
||||
{
|
||||
|
||||
}
|
||||
float moveTime = 0;
|
||||
public bool isyz = false;
|
||||
public string yzID="";
|
||||
public virtual void OnMoveUpdata()
|
||||
{
|
||||
if (isyz)
|
||||
{
|
||||
switch (yzID)
|
||||
{
|
||||
case "30001":
|
||||
moveTime += Time.deltaTime;
|
||||
var movestart=monsterData.moveLine.bezierCurveData.start;
|
||||
Vector2 v2 = movestart+(Vector2)(transform.up*moveTime* monsterData.moveLine.moveTime);
|
||||
transform.position = v2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
moveTime += Time.deltaTime;
|
||||
Vector2 v2 = monsterData.moveLine.GetBezierPoint(moveTime);
|
||||
if (fishType != FishTypeEnum.Boss鱼)
|
||||
{
|
||||
transform.up = ((Vector2)transform.position - v2).normalized;
|
||||
}
|
||||
transform.position = v2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void PlayAnim(CharacterAnimationType animType, bool loop = true)
|
||||
{
|
||||
if (skeleton!=null)
|
||||
skeleton.AnimationState.SetAnimation(0, dic_AnimKeyAnimName[animType], loop);
|
||||
}
|
||||
public void OnEnter(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
OnMoveEnter();
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void OnUpdate(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
OnMoveUpdata();
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void OnExit(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void ChangeState(CharacterStateType stateType)
|
||||
{
|
||||
OnExit(currState);
|
||||
currState = stateType;
|
||||
OnEnter(currState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e5dca86a57fe2144a34f1f2ddb93962
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,105 +0,0 @@
|
||||
using Spine;
|
||||
using Spine.Unity;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class MonsterControl : MonoBehaviour
|
||||
{
|
||||
public MonsterDataBase monsterData = new MonsterDataBase(new MonsterHealthBase());
|
||||
public SkeletonAnimation skeleton;
|
||||
public bool isSpine = true;
|
||||
public Dictionary<CharacterAnimationType, string> dic_AnimKeyAnimName = new Dictionary<CharacterAnimationType, string>();
|
||||
public CharacterStateType currState;
|
||||
public GameObject effect_Hurt;//遮罩闪烁
|
||||
|
||||
public GameObject effect_Die;//删除
|
||||
|
||||
|
||||
public void InitAnimList()
|
||||
{
|
||||
dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
|
||||
}
|
||||
//这里捕鱼的结构很简单可以穿模直接写移动
|
||||
void Update()
|
||||
{
|
||||
OnUpdate(currState);
|
||||
}
|
||||
public void Start()
|
||||
{
|
||||
InitAnimList();
|
||||
ChangeState(CharacterStateType.move);
|
||||
}
|
||||
public virtual void OnMoveEnter()
|
||||
{
|
||||
PlayAnim(CharacterAnimationType.move);
|
||||
}
|
||||
public virtual void OnMoveExit()
|
||||
{
|
||||
|
||||
}
|
||||
float moveTime = 0;
|
||||
public virtual void OnMoveUpdata()
|
||||
{
|
||||
moveTime += Time.deltaTime;
|
||||
|
||||
//播放动画
|
||||
skeleton.AnimationState.SetAnimation(0, dic_AnimKeyAnimName[CharacterAnimationType.move], true);
|
||||
//transform.position = new Vector3();//等策划给路线
|
||||
Vector2 v2 = monsterData.moveLine.GetBezierPoint(moveTime);
|
||||
Debug.Log(v2);
|
||||
transform.position = v2;
|
||||
//transform.Translate(Vector3.down);
|
||||
|
||||
}
|
||||
|
||||
public void PlayAnim(CharacterAnimationType animType, bool loop = true)
|
||||
{
|
||||
skeleton.AnimationState.SetAnimation(0, dic_AnimKeyAnimName[animType], loop);
|
||||
}
|
||||
public void OnEnter(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
OnMoveEnter();
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void OnUpdate(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
OnMoveUpdata();
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void OnExit(CharacterStateType stateType)
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move:
|
||||
break;
|
||||
case CharacterStateType.idle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void ChangeState(CharacterStateType stateType)
|
||||
{
|
||||
OnExit(currState);
|
||||
currState = stateType;
|
||||
OnEnter(currState);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using Assets.MyGame.Scripts.Net.API.GameConfig_SubClass;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
[System.Serializable]
|
||||
@@ -6,6 +7,7 @@ public class MonsterDataBase : CharactersDataBase
|
||||
{
|
||||
public float die_Score;
|
||||
public bool isDie;
|
||||
public RoomFishDetailConfig roomFishDetailConfig;
|
||||
|
||||
public MonsterMoveLine moveLine=new MonsterMoveLine();
|
||||
public MonsterDataBase(MonsterHealthBase health) : base(health)
|
||||
|
||||
@@ -18,19 +18,21 @@ public class MonsterMoveLine
|
||||
public Vector2 end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static async void LoadBezier()
|
||||
{
|
||||
await LoadBezierTxtAsync("MoveLine");
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取数据 游戏开始时在awake调用aa包
|
||||
/// 读取曲线数据 读取单个
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task LoadBezierTxtAsync(string path)
|
||||
public static async Task LoadSingleBezierTxtAsync(string path)
|
||||
{
|
||||
AsyncOperationHandle<TextAsset> handle = Addressables.LoadAssetAsync<TextAsset>(path);
|
||||
await handle.Task;
|
||||
var lines = handle.Result.text.Split('\n');
|
||||
|
||||
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
@@ -51,9 +53,12 @@ public class MonsterMoveLine
|
||||
|
||||
// 第一个点是 start
|
||||
curve.start = points[0];
|
||||
if (points.Count > 1)
|
||||
{
|
||||
// 最后一个点是 end
|
||||
curve.end = points[points.Count - 1];
|
||||
}
|
||||
|
||||
// 最后一个点是 end
|
||||
curve.end = points[points.Count - 1];
|
||||
|
||||
// 中间的都是 controlPoints
|
||||
for (int i = 1; i < points.Count - 1; i++)
|
||||
@@ -62,10 +67,64 @@ public class MonsterMoveLine
|
||||
}
|
||||
|
||||
curves.Add(curve);
|
||||
dic_BezierCurveDatas.Add(curve.name,curve);
|
||||
}
|
||||
dic_BezierCurveDatas.Add(curve.name, curve);
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取曲线数据 游戏开始时在awake调用aa包
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task LoadBezierTxtAsync(string path)
|
||||
{
|
||||
AsyncOperationHandle<IList<TextAsset>> handles = Addressables.LoadAssetsAsync<TextAsset>(path,null);
|
||||
await handles.Task;
|
||||
foreach (var text in handles.Result)
|
||||
{
|
||||
var lines = text.text.Split('\n');
|
||||
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
|
||||
var parts = line.Split(';');
|
||||
BezierCurveData curve = new BezierCurveData();
|
||||
|
||||
// 第一个是曲线名
|
||||
curve.name = parts[0];
|
||||
|
||||
// 后面所有都是点
|
||||
List<Vector2> points = new List<Vector2>();
|
||||
for (int i = 1; i < parts.Length; i++)
|
||||
{
|
||||
points.Add(ParseVector(parts[i]));
|
||||
}
|
||||
|
||||
// 第一个点是 start
|
||||
curve.start = points[0];
|
||||
if (points.Count > 1)
|
||||
{
|
||||
// 最后一个点是 end
|
||||
curve.end = points[points.Count - 1];
|
||||
}
|
||||
|
||||
|
||||
// 中间的都是 controlPoints
|
||||
for (int i = 1; i < points.Count - 1; i++)
|
||||
{
|
||||
curve.controlPoints.Add(points[i]);
|
||||
}
|
||||
|
||||
curves.Add(curve);
|
||||
dic_BezierCurveDatas.Add(curve.name, curve);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("曲线读取完成共" + dic_BezierCurveDatas.Count + "条");
|
||||
|
||||
}
|
||||
|
||||
private static Vector2 ParseVector(string s)
|
||||
@@ -83,7 +142,13 @@ public class MonsterMoveLine
|
||||
{
|
||||
this.bezierCurveData = bezierCurveData;
|
||||
this.moveTime = Time;
|
||||
Debug.Log($"初始化曲线 {this.bezierCurveData.name} ,移动时间 {moveTime}");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取曲线上的点
|
||||
/// </summary>
|
||||
/// <param name="t"></param>
|
||||
/// <returns></returns>
|
||||
public Vector2 GetBezierPoint(float t)
|
||||
{
|
||||
t = t / moveTime;
|
||||
@@ -95,6 +160,7 @@ public class MonsterMoveLine
|
||||
|
||||
return DeCasteljau(points, t%1);
|
||||
}
|
||||
|
||||
|
||||
private Vector2 DeCasteljau(List<Vector2> points, float t)
|
||||
{
|
||||
@@ -107,50 +173,9 @@ public class MonsterMoveLine
|
||||
}
|
||||
points = next;
|
||||
}
|
||||
return CanvasToWorld( points[0],UIManager.Instance.uiRoot.GetComponent<RectTransform>(),Camera.main);
|
||||
}
|
||||
public static Vector3 CanvasToWorld(Vector2 canvasPos, RectTransform canvas, Camera cam)
|
||||
{
|
||||
// 1. 获取 Canvas 实际像素尺寸(自动适配所有设备)
|
||||
float canvasWidth = canvas.rect.width;
|
||||
float canvasHeight = canvas.rect.height;
|
||||
|
||||
// 2. 正交相机的世界高度
|
||||
float worldHeight = cam.orthographicSize * 2f;
|
||||
|
||||
// 3. 世界宽度 = 世界高度 * 屏幕宽高比
|
||||
float worldWidth = worldHeight * cam.aspect;
|
||||
|
||||
// 4. 画布单位 → 世界单位比例(横竖一致)
|
||||
float scaleX = worldWidth / canvasWidth;
|
||||
float scaleY = worldHeight / canvasHeight;
|
||||
|
||||
// 5. 你的 canvasPos 是以中心为原点的坐标
|
||||
float worldX = canvasPos.x * scaleX;
|
||||
float worldY = canvasPos.y * scaleY;
|
||||
|
||||
// 6. 映射到世界 z = 0 平面
|
||||
return new Vector3(worldX, worldY, 0f);
|
||||
return CoordinateTransformation.CanvasToWorld( points[0],UIManager.Instance.uiRoot.GetComponent<RectTransform>(),Camera.main);
|
||||
}
|
||||
|
||||
public static Vector2 AnchoredPos_ToCanvas(RectTransform target, Canvas canvas)
|
||||
{
|
||||
// 1. 先把 anchoredPosition(父坐标)转换成世界坐标
|
||||
Vector3 worldPos = target.TransformPoint(target.anchoredPosition);
|
||||
|
||||
// 2. 再把世界坐标转换成 Canvas 的局部坐标(等价于 Canvas 下的 anchoredPosition)
|
||||
RectTransform canvasRT = canvas.GetComponent<RectTransform>();
|
||||
|
||||
Vector2 canvasLocalPos;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||
canvasRT,
|
||||
RectTransformUtility.WorldToScreenPoint(canvas.worldCamera, worldPos),
|
||||
canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera,
|
||||
out canvasLocalPos
|
||||
);
|
||||
|
||||
return canvasLocalPos;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using Model.Entity.BaseModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public enum FishCreateType
|
||||
{
|
||||
None,
|
||||
Line,
|
||||
}
|
||||
public static class CreateFishType
|
||||
{
|
||||
public static Dictionary<FishCreateType, Action<RoomFishDetailConfig>> dic_CreateFishType = new Dictionary<FishCreateType, Action<RoomFishDetailConfig>>();
|
||||
static CreateFishType()
|
||||
{
|
||||
//dic_CreateFishType.Add(FishCreateType.Line, CreateLine);
|
||||
}
|
||||
public static void CreateFish(RoomFishDetailConfig roomFishDetailConfig)
|
||||
{
|
||||
switch (roomFishDetailConfig.Type)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd4d4aaffcca6c742943da902e2e5d4e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +1,48 @@
|
||||
using System.Collections;
|
||||
using Assets.MyGame.Scripts.Net;
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Assets.MyGame.Scripts.Net.WebResponses;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
|
||||
public class BullitMove : MonoBehaviour
|
||||
{
|
||||
public RoomJoinNotice user;
|
||||
public float moveSpeed = 5;
|
||||
public float desTime = 10f;
|
||||
public string playerID;
|
||||
public GameObject effectPrefab;
|
||||
public GameObject diePrefab;
|
||||
float currShowTime = 0f;
|
||||
Vector3 vector3_startPosition;
|
||||
public bool isTriggerFirst=true;
|
||||
public bool isTriggerFirst = true;
|
||||
MonsterContral target;
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
Init();
|
||||
Destroy(gameObject, desTime);
|
||||
//Destroy(gameObject, desTime);
|
||||
}
|
||||
bool isLock = false;
|
||||
public void Lock(MonsterContral monsterContral)
|
||||
{
|
||||
foreach (var item in GetComponents<Collider2D>())
|
||||
{
|
||||
item.enabled = false;
|
||||
}
|
||||
isLock = true;
|
||||
target = monsterContral;
|
||||
}
|
||||
public void NotLock()
|
||||
{
|
||||
foreach (var item in GetComponents<Collider2D>())
|
||||
{
|
||||
item.enabled = true;
|
||||
}
|
||||
isLock = false;
|
||||
target = null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 对象池用
|
||||
@@ -24,33 +51,145 @@ public class BullitMove : MonoBehaviour
|
||||
{
|
||||
vector3_startPosition = transform.position;
|
||||
}
|
||||
//子弹同步分为两种一种是锁定目标一种是不锁定目标
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
//方便帧同步
|
||||
currShowTime += Time.deltaTime;
|
||||
Vector3 targetPoint = transform.up.normalized * currShowTime * moveSpeed;
|
||||
transform.position = vector3_startPosition + targetPoint;
|
||||
if (isLock)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
NotLock();
|
||||
}
|
||||
var ABdistance = Vector3.Distance(transform.position, target.transform.position);
|
||||
var rotateSpeed = 1/ABdistance;
|
||||
Vector3 targetPoint = (target.transform.position-transform.position).normalized * moveSpeed*Time.deltaTime;
|
||||
transform.up = Vector3.Slerp(transform.up, targetPoint, rotateSpeed);
|
||||
targetPoint = transform.up.normalized * moveSpeed * Time.deltaTime;
|
||||
transform.position+= targetPoint;
|
||||
if (ABdistance <= 2)
|
||||
{
|
||||
AttackFish(target);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//方便帧同步
|
||||
currShowTime += Time.deltaTime;
|
||||
Vector3 targetPoint = transform.up.normalized * currShowTime * moveSpeed;
|
||||
transform.position = vector3_startPosition + targetPoint;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void OnTriggerEnter2D(Collider2D collision)
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
if (isTriggerFirst)
|
||||
{
|
||||
if (collision.tag == "Monster")
|
||||
if (collision.transform.tag == "Fish")
|
||||
{
|
||||
isTriggerFirst=false;
|
||||
isTriggerFirst = false;
|
||||
//击中特效
|
||||
Instantiate(effectPrefab,transform.position,Quaternion.identity);
|
||||
if (effectPrefab != null)
|
||||
{
|
||||
Instantiate(effectPrefab, transform.position, Quaternion.identity, transform.parent);
|
||||
}
|
||||
|
||||
//受激
|
||||
collision.transform.GetComponent<MonsterControl>().monsterData.charactersHealth.OnHurt(10, CharacterHurtType.none);
|
||||
Destroy(collision.gameObject);
|
||||
var monster = collision.transform.GetComponentInParent<MonsterContral>();
|
||||
monster.monsterData.charactersHealth.OnHurt(10, CharacterHurtType.none);
|
||||
Destroy(monster.gameObject);
|
||||
Destroy(gameObject);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public static Quaternion RotationFromVector2(Vector2 dir)
|
||||
{
|
||||
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
|
||||
return Quaternion.Euler(0, 0, angle);
|
||||
}
|
||||
// 计算反射角度
|
||||
Vector2 GetReflectionAngle(Vector2 velocity, Vector2 normal)
|
||||
{
|
||||
// 反射向量
|
||||
return Vector2.Reflect(velocity.normalized, normal.normalized);
|
||||
|
||||
}
|
||||
public void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if (isTriggerFirst)
|
||||
{
|
||||
if (collision.tag == "Fish")
|
||||
{
|
||||
isTriggerFirst = false;
|
||||
var monster = collision.transform.GetComponentInParent<MonsterContral>();
|
||||
|
||||
AttackFish(monster);
|
||||
|
||||
}
|
||||
else if (collision.tag == "Wall")
|
||||
{
|
||||
Vector3 v3 = transform.eulerAngles;
|
||||
switch (collision.name)
|
||||
{
|
||||
case "up":
|
||||
v3.z = -v3.z+180;
|
||||
break;
|
||||
case "down":
|
||||
v3.z = -v3.z + 180;
|
||||
break;
|
||||
case "left":
|
||||
v3.z = -v3.z;
|
||||
break;
|
||||
case "right":
|
||||
v3.z = -v3.z;
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
vector3_startPosition = transform.position;
|
||||
currShowTime = 0;
|
||||
transform.eulerAngles = v3;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void AttackFish(MonsterContral monster)
|
||||
{
|
||||
//击中特效
|
||||
if (effectPrefab != null)
|
||||
{
|
||||
Instantiate(effectPrefab, transform.position, Quaternion.identity, transform.parent);
|
||||
}
|
||||
|
||||
//请求服务端是否杀死
|
||||
var v1 = GameManager.Instance.gameData.roomJoinNotice;
|
||||
var v2 = GameManager.Instance.gameData.currRoomData;
|
||||
WebSocketSendList.KillFish(v2.roomId, user.userId, monster.monsterData.roomFishDetailConfig.fishNumber, monster.hashCode,GameManager.Instance.gameData.roomJoinNotice.cannonMultiple);
|
||||
|
||||
|
||||
//受激
|
||||
|
||||
//monster.monsterData.charactersHealth.OnHurt(10, CharacterHurtType.none);
|
||||
//monster.HP--;
|
||||
//if (monster.HP == 0)
|
||||
//{
|
||||
// Instantiate(monster.effect_Die == null ? diePrefab : monster.effect_Die, monster.transform.position, Quaternion.identity, transform.parent);
|
||||
// Destroy(monster.gameObject);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
monster.OnHurt();
|
||||
//}
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using Model.Entity;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "createassetMenu", menuName = "fishCreate", order = 0)]
|
||||
public class CreateFishData : ScriptableObject
|
||||
{
|
||||
public GameConfig gameConfig;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 448dd789737bdee49806647168069597
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,405 @@
|
||||
using Assets.MyGame.Scripts.Net;
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Assets.MyGame.Scripts.Net.API.GameConfig_SubClass;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
|
||||
using Assets.MyGame.Scripts.Net.WebResponses;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
{
|
||||
#region //这里不用了 但是留着
|
||||
/*public CreateFishData createFishData;
|
||||
public async void InitCreateFishData(string path)
|
||||
{
|
||||
createFishData = await Addressables.LoadAssetAsync<CreateFishData>(path).Task;
|
||||
}
|
||||
public string path;*/
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 全局配置(外部初始化)
|
||||
/// </summary>
|
||||
//public GameConfig M_GameConfig { get { return GameManager.Instance.gameConfig; } }
|
||||
#endregion
|
||||
public GameConfig M_GameConfig => GameManager.Instance.gameConfig;
|
||||
|
||||
// 缓存字段
|
||||
private Dictionary<GameTypeEnum, RoomFishConfig> roomFishConfig;
|
||||
private Dictionary<GameTypeEnum, Dictionary<string, RoomFishDetailConfig>> createDic;
|
||||
private Dictionary<string, FishTypeConfig> fishDatas;
|
||||
public Dictionary<string,MonsterContral> fishDatas_hashCodekey=new Dictionary<string, MonsterContral>();
|
||||
public Dictionary<string, FishTypeConfig> FishDatas { get {
|
||||
if (fishDatas != null)
|
||||
return fishDatas;
|
||||
fishDatas =new Dictionary<string, FishTypeConfig>();
|
||||
foreach (var item in M_GameConfig.fishTypeConfigs)
|
||||
{
|
||||
fishDatas.Add(item.fishNumber, item);
|
||||
}
|
||||
return fishDatas;
|
||||
} }
|
||||
#region 初始化鱼生成配置
|
||||
/// <summary>
|
||||
/// 懒加载初始化(只执行一次)
|
||||
/// </summary>
|
||||
private void EnsureInit()
|
||||
{
|
||||
if (roomFishConfig != null)
|
||||
return;
|
||||
|
||||
roomFishConfig = new Dictionary<GameTypeEnum, RoomFishConfig>();
|
||||
createDic = new Dictionary<GameTypeEnum, Dictionary<string, RoomFishDetailConfig>>();
|
||||
|
||||
|
||||
var list = GameManager.Instance.gameConfig.roomFishConfigs;
|
||||
if (list == null || list.Count == 0)
|
||||
return;
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
GameTypeEnum gameType = (GameTypeEnum)item.gameType;
|
||||
|
||||
// 安全添加(避免重复 key 抛异常)
|
||||
roomFishConfig[gameType] = item;
|
||||
|
||||
// 初始化子字典
|
||||
var fishDic = new Dictionary<string, RoomFishDetailConfig>();
|
||||
createDic[gameType] = fishDic;
|
||||
|
||||
// 普通鱼
|
||||
if (item.normalFishList != null)
|
||||
{
|
||||
foreach (var fish in item.normalFishList)
|
||||
fishDic[fish.fishNumber] = fish;
|
||||
}
|
||||
|
||||
// 等级鱼(若与基础鱼相同素材替换基础的)
|
||||
if (item.roomFishLevelList != null)
|
||||
{
|
||||
foreach (var fish in item.roomFishLevelList)
|
||||
fishDic[fish.fishNumber] = fish;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 房间鱼配置(按游戏类型)
|
||||
/// </summary>
|
||||
public Dictionary<GameTypeEnum, RoomFishConfig> RoomFishConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureInit();
|
||||
return roomFishConfig;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 鱼号 → 鱼配置(按游戏类型)
|
||||
/// </summary>
|
||||
public Dictionary<GameTypeEnum, Dictionary<string, RoomFishDetailConfig>> CreateDic
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureInit();
|
||||
return createDic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region // 鱼生成计时器相关
|
||||
private NativeArray<float> timers;
|
||||
private NativeArray<float> frequencies;
|
||||
private NativeArray<int> shouldSpawn;
|
||||
public GameObject dieFXPrefab;
|
||||
private List<RoomFishDetailConfig> spawnList; // 当前房间的鱼配置
|
||||
public void InitSpawnSystem(GameTypeEnum gameType)
|
||||
{
|
||||
EnsureInit();
|
||||
|
||||
var config = RoomFishConfig[gameType];
|
||||
spawnList = new List<RoomFishDetailConfig>();
|
||||
|
||||
// 合并普通鱼 + 等级鱼
|
||||
spawnList.AddRange(config.normalFishList);
|
||||
spawnList.AddRange(config.roomFishLevelList);
|
||||
|
||||
int count = spawnList.Count;
|
||||
|
||||
timers = new NativeArray<float>(count, Allocator.Persistent);
|
||||
frequencies = new NativeArray<float>(count, Allocator.Persistent);
|
||||
shouldSpawn = new NativeArray<int>(count, Allocator.Persistent);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
timers[i] = 0;
|
||||
frequencies[i] = spawnList[i].fishFrequency;
|
||||
shouldSpawn[i] = 0;
|
||||
}
|
||||
}
|
||||
public void CloseSpawnSystem()
|
||||
{
|
||||
spawnList = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 鱼的父节点(用于层级管理)
|
||||
/// </summary>
|
||||
public Transform fishRoot;
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
if (fishRoot == null)
|
||||
{
|
||||
fishRoot = new GameObject("FishRoot").transform;
|
||||
}
|
||||
// CreateSingleFish();
|
||||
new FishResourcesData(); //这里用来测试加载鱼预制体
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (spawnList == null)
|
||||
return;
|
||||
|
||||
var job = new FishSpawnTimerJob
|
||||
{
|
||||
deltaTime = Time.deltaTime,
|
||||
timers = timers,
|
||||
frequencies = frequencies,
|
||||
shouldSpawn = shouldSpawn
|
||||
};
|
||||
|
||||
JobHandle handle = job.Schedule();
|
||||
handle.Complete();
|
||||
|
||||
// 主线程执行生成
|
||||
for (int i = 0; i < spawnList.Count; i++)
|
||||
{
|
||||
if (shouldSpawn[i] == 1)
|
||||
{
|
||||
var fish = spawnList[i];
|
||||
SpawnFishMainThread(fish);
|
||||
}
|
||||
}
|
||||
}
|
||||
private async void SpawnFishMainThread(RoomFishDetailConfig cfg)
|
||||
{
|
||||
|
||||
if (cfg.type==1)
|
||||
{
|
||||
bool flowControl = OnlyFish(cfg);
|
||||
if (!flowControl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (cfg.type==2)
|
||||
{
|
||||
//cfg.fishNumber;3
|
||||
var yz = GameManager.Instance.gameConfig.fishArrayConfigs.Find(a => a.arrayNumber == cfg.fishNumber);
|
||||
|
||||
FishTypeConfig fishType = M_GameConfig.fishTypeConfigs
|
||||
.Find(f => f.fishNumber == yz.fishNumber);
|
||||
// 3. 出生点
|
||||
Vector3 pos = new Vector3(
|
||||
9999, 9999, 0
|
||||
);
|
||||
var prefab = FishResourcesData.GetFishPrefab(fishType.fishNumber);
|
||||
|
||||
|
||||
switch (cfg.fishNumber)
|
||||
{
|
||||
case "30001":
|
||||
for (int i = 0; i < yz.fishCount; i++)
|
||||
{
|
||||
|
||||
// 4. 实例化
|
||||
GameObject fish = Instantiate(prefab, pos, Quaternion.Euler(Vector3.forward* (yz.fishCount *10/2)+ Vector3.forward*i*10), fishRoot);
|
||||
var v = fish.GetComponent<MonsterContral>();
|
||||
v.monsterData.roomFishDetailConfig = cfg;
|
||||
v.hashCode = v.gameObject.GetHashCode().ToString();
|
||||
fishDatas_hashCodekey[v.hashCode] = v;
|
||||
var list = FishDatas[cfg.fishNumber].pathList;
|
||||
//int pathId = list[Random.Range(0, list.Count)];
|
||||
int pathId = list[Random.Range(0, 5)];
|
||||
v.Init(MonsterMoveLine.dic_BezierCurveDatas["鱼阵" + pathId+1], 10,true);
|
||||
v.fishType = (FishTypeEnum)FishDatas[cfg.fishNumber].fishType;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//// 4. 实例化
|
||||
//GameObject fish = Instantiate(prefab, pos, Quaternion.identity, fishRoot);
|
||||
//var v = fish.GetComponent<MonsterContral>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool OnlyFish(RoomFishDetailConfig cfg)
|
||||
{
|
||||
// 1. 找到鱼的基础配置
|
||||
FishTypeConfig fishType = M_GameConfig.fishTypeConfigs
|
||||
.Find(f => f.fishNumber == cfg.fishNumber);
|
||||
|
||||
if (fishType == null)
|
||||
{
|
||||
Debug.LogError($"找不到鱼配置:{cfg.fishNumber}");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 2. 加载 Prefab(imageUrl 你可以换成自己的字段)
|
||||
//var prefab = await Addressables.LoadAssetAsync<GameObject>(fishType.imageUrl).Task;
|
||||
var prefab = FishResourcesData.GetFishPrefab(fishType.fishNumber);
|
||||
|
||||
// 3. 出生点
|
||||
Vector3 pos = new Vector3(
|
||||
9999, 9999, 0
|
||||
);
|
||||
|
||||
// 4. 实例化
|
||||
GameObject fish = Instantiate(prefab, pos, Quaternion.identity, fishRoot);
|
||||
var v = fish.GetComponent<MonsterContral>();
|
||||
// 5. 初始化路径
|
||||
if (v == null)
|
||||
{
|
||||
v = fish.AddComponent<MonsterContral>();
|
||||
}
|
||||
v.monsterData.roomFishDetailConfig = cfg;
|
||||
v.hashCode = v.gameObject.GetHashCode().ToString();
|
||||
fishDatas_hashCodekey[v.hashCode] = v;
|
||||
var list = FishDatas[cfg.fishNumber].pathList;
|
||||
int pathId = list[Random.Range(0, list.Count)];
|
||||
v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + pathId], 10);
|
||||
v.fishType = (FishTypeEnum)FishDatas[cfg.fishNumber].fishType;
|
||||
//v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + Random.Range(1, 4).ToString()], 10);
|
||||
////初始化
|
||||
//GameObject obj = Instantiate(prefab, Vector3.one * 999, Quaternion.identity);
|
||||
//var v = obj.GetComponent<MonsterControl>();
|
||||
////v.dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
|
||||
|
||||
//v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + Random.Range(1, 4).ToString()], 10);
|
||||
Debug.Log($"生成鱼:{fishType.fishName}");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void CreateFishArray(string arrayNumber)
|
||||
{
|
||||
var array = M_GameConfig.fishArrayConfigs
|
||||
.Find(a => a.fishArrayNumber == arrayNumber);
|
||||
|
||||
if (array == null)
|
||||
{
|
||||
Debug.LogError($"找不到鱼阵:{arrayNumber}");
|
||||
return;
|
||||
}
|
||||
|
||||
// 未来扩展:阵型、路径、Boss、普通鱼
|
||||
//// array.ty.fishNumber
|
||||
|
||||
|
||||
|
||||
// // 2. 加载 Prefab(imageUrl 你可以换成自己的字段)
|
||||
// //var prefab = await Addressables.LoadAssetAsync<GameObject>(fishType.imageUrl).Task;
|
||||
// var prefab = FishResourcesData.CreateFishPrefab(fishType.fishNumber);
|
||||
|
||||
// // 3. 随机出生点
|
||||
// Vector3 pos = new Vector3(
|
||||
// Random.Range(-8f, 8f),
|
||||
// Random.Range(-5f, 5f),
|
||||
// 0
|
||||
// );
|
||||
|
||||
// // 4. 实例化
|
||||
// GameObject fish = Instantiate(prefab, pos, Quaternion.identity, fishRoot);
|
||||
// var v = fish.GetComponent<MonsterContral>();
|
||||
// // 5. 初始化路径
|
||||
// if (v == null)
|
||||
// {
|
||||
// v = fish.AddComponent<MonsterContral>();
|
||||
// }
|
||||
// v.monsterData.roomFishDetailConfig = cfg;
|
||||
// v.hashCode = v.gameObject.GetHashCode().ToString();
|
||||
// fishDatas_hashCodekey[v.hashCode] = v;
|
||||
// var list = FishDatas[cfg.fishNumber].pathList;
|
||||
// int pathId = list[Random.Range(0, list.Count)];
|
||||
// v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + pathId], 10);
|
||||
// v.fishType = (FishTypeEnum)FishDatas[cfg.fishNumber].fishType;
|
||||
// //v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + Random.Range(1, 4).ToString()], 10);
|
||||
// ////初始化
|
||||
// //GameObject obj = Instantiate(prefab, Vector3.one * 999, Quaternion.identity);
|
||||
// //var v = obj.GetComponent<MonsterControl>();
|
||||
// ////v.dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
|
||||
|
||||
// //v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线" + Random.Range(1, 4).ToString()], 10);
|
||||
// Debug.Log($"生成鱼:{fishType.fishName}");
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void EnterRoom(GameTypeEnum gameType)
|
||||
{
|
||||
InitSpawnSystem(gameType);
|
||||
}
|
||||
public void ExitRoom()
|
||||
{
|
||||
CloseSpawnSystem();
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 1. 生成单条鱼
|
||||
// ============================================================
|
||||
public async void CreateSingleFish(string fishNumber, int pathId)
|
||||
{
|
||||
switch ((GameTypeEnum)GameManager.Instance.gameData.currGameType)
|
||||
{
|
||||
case GameTypeEnum.风雷之渊:
|
||||
|
||||
break;
|
||||
case GameTypeEnum.太古仙墟:
|
||||
break;
|
||||
case GameTypeEnum.中国象棋:
|
||||
break;
|
||||
case GameTypeEnum.星际迷航:
|
||||
break;
|
||||
case GameTypeEnum.黑神话悟空:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void DesFish(string msg)
|
||||
{
|
||||
var killFish = JsonConvert.DeserializeObject<WebSocketResponseBase<RoomKillNotice>>(msg).arguments[0];
|
||||
if (fishDatas_hashCodekey.ContainsKey(killFish.fishId))
|
||||
{
|
||||
var monster = fishDatas_hashCodekey[killFish.fishId];
|
||||
Instantiate(monster.effect_Die == null ? dieFXPrefab : monster.effect_Die, monster.transform.position, Quaternion.identity, transform.parent);
|
||||
Destroy(monster.gameObject);
|
||||
fishDatas_hashCodekey.Remove(killFish.fishId);
|
||||
|
||||
GameManager.Instance.gameData.roomJoinNotice.gold += killFish.gold;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5aef59b4f4e8284bba9598af929a2fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
using Unity.Jobs;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
|
||||
[BurstCompile]
|
||||
public struct FishSpawnTimerJob : IJob
|
||||
{
|
||||
public float deltaTime;
|
||||
public NativeArray<float> timers; // 每条鱼的计时器
|
||||
public NativeArray<float> frequencies; // 每条鱼的频率
|
||||
public NativeArray<int> shouldSpawn; // 输出:是否应该生成
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
for (int i = 0; i < timers.Length; i++)
|
||||
{
|
||||
timers[i] += deltaTime;
|
||||
|
||||
if (timers[i] >= frequencies[i])
|
||||
{
|
||||
timers[i] = 0;
|
||||
shouldSpawn[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
shouldSpawn[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f77586f15b6c4e48aa6dacb0a25eebb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +1,14 @@
|
||||
using System.Collections;
|
||||
using Assets.MyGame.Scripts.Net.WebResponses;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameData
|
||||
{
|
||||
public GameType currGameType;
|
||||
public RoomJoinNotice roomJoinNotice;
|
||||
public RoomChangeResponse currRoomData;
|
||||
|
||||
public string currUser;
|
||||
public string a;
|
||||
}
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.MyGame.Scripts.Net;
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : MonoSingleton<GameManager>
|
||||
{
|
||||
|
||||
public GameConfig gameConfig;
|
||||
public UserToken user;
|
||||
public GameData gameData=new GameData();
|
||||
public Scene scene;
|
||||
protected override async void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
gameData.currUser="123";
|
||||
//CharacterAnimationType
|
||||
MonsterMoveLine.LoadBezierTxtAsync("MoveLines");
|
||||
}
|
||||
MonsterMoveLine.LoadBezier();//初始化加载路线
|
||||
//string json = Resources.Load<TextAsset>("Config/GameConfig").text;
|
||||
|
||||
//gameConfig = JsonConvert.DeserializeObject<APIResponse<GameConfig>>(json).data;
|
||||
APIManager.Response<GameConfig>(APIType.GameConfig_Get, res => { gameConfig = res; var v = CreateFishManager.Instance.CreateDic; });
|
||||
|
||||
}
|
||||
public void StartGame()
|
||||
{
|
||||
|
||||
switch (gameData.currGameType)
|
||||
{
|
||||
case GameType.JQQD:
|
||||
@@ -34,7 +41,8 @@ public class GameManager : MonoSingleton<GameManager>
|
||||
UIManager.Instance.ShowAsync(UIPanel.MainGamePanelDefault);
|
||||
break;
|
||||
case GameType.XJMH:
|
||||
UIManager.Instance.ShowAsync(UIPanel.MainGamePanelXJMH);
|
||||
WebSocketManager.Instance.Connect(SocketType.game);
|
||||
|
||||
break;
|
||||
case GameType.HHWK:
|
||||
UIManager.Instance.ShowAsync(UIPanel.MainGamePanelDefault);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7724d5a5ef361f4fa203c706d55ddfb
|
||||
guid: 3813b58222a7b8242ae9705ab135bab6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,258 @@
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net
|
||||
{
|
||||
public static class APIManager
|
||||
{
|
||||
public static Dictionary<APIType, string> dic_API = new Dictionary<APIType, string>();
|
||||
public const string baseURL = "http://524game.32.hzgqapp.com";
|
||||
static string token;
|
||||
|
||||
static APIManager()
|
||||
{
|
||||
// ---------------- GameConfig ----------------
|
||||
dic_API[APIType.GameConfig_Init] = "/api/GameConfig/init";
|
||||
dic_API[APIType.GameConfig_Get] = "/api/GameConfig";
|
||||
dic_API[APIType.GameConfig_Update] = "/api/GameConfig/Update";
|
||||
|
||||
// ---------------- Hall ----------------
|
||||
dic_API[APIType.Hall_SaveSafeBox] = "/api/Hall/SaveSafeBox";
|
||||
dic_API[APIType.Hall_GetSafeBox] = "/api/Hall/GetSafeBox";
|
||||
dic_API[APIType.Hall_SetSafeBoxPassword] = "/api/Hall/SetSafeBoxPassword";
|
||||
dic_API[APIType.Hall_ResetSafeBoxPassword] = "/api/Hall/ResetSafeBoxPassword";
|
||||
dic_API[APIType.Hall_GetRelief] = "/api/Hall/GetRelief";
|
||||
dic_API[APIType.Hall_SynthesisFragment] = "/api/Hall/SynthesisFragment";
|
||||
dic_API[APIType.Hall_BuyMonthCard] = "/api/Hall/BuyMonthCard";
|
||||
dic_API[APIType.Hall_BuyProp] = "/api/Hall/BuyProp";
|
||||
dic_API[APIType.Hall_BuyGold] = "/api/Hall/BuyGold";
|
||||
dic_API[APIType.Hall_BuyDiamond] = "/api/Hall/BuyDiamond";
|
||||
dic_API[APIType.Hall_SignIn] = "/api/Hall/SignIn";
|
||||
dic_API[APIType.Hall_ChangeCannon] = "/api/Hall/ChangeCannon";
|
||||
dic_API[APIType.Hall_ChangeWing] = "/api/Hall/ChangeWing";
|
||||
dic_API[APIType.Hall_ChangeGodWar] = "/api/Hall/ChangeGodWar";
|
||||
dic_API[APIType.Hall_GetVipDayGift] = "/api/Hall/GetVipDayGift";
|
||||
dic_API[APIType.Hall_GetVipGift] = "/api/Hall/GetVipGift";
|
||||
dic_API[APIType.Hall_GetMonthCardDayGift] = "/api/Hall/GetMonthCardDayGift";
|
||||
dic_API[APIType.Hall_GetMonthCardGift] = "/api/Hall/GetMonthCardGift";
|
||||
dic_API[APIType.Hall_GetUserTaskList] = "/api/Hall/GetUserTaskList";
|
||||
dic_API[APIType.Hall_DistributeRewards] = "/api/Hall/DistributeRewards";
|
||||
|
||||
// ---------------- HubsReceive ----------------
|
||||
dic_API[APIType.Hubs_GetRoomList] = "/hubs/GetRoomList";
|
||||
dic_API[APIType.Hubs_JoinRoom] = "/hubs/JoinRoom";
|
||||
dic_API[APIType.Hubs_SyncGameData] = "/hubs/SyncGameData";
|
||||
dic_API[APIType.Hubs_ShootBullet] = "/hubs/ShootBullet";
|
||||
dic_API[APIType.Hubs_UseProp] = "/hubs/UseProp";
|
||||
dic_API[APIType.Hubs_KillFish] = "/hubs/KillFish";
|
||||
dic_API[APIType.Hubs_LeaveRoom] = "/hubs/LeaveRoom";
|
||||
dic_API[APIType.Hubs_ChangeGunMultiple] = "/hubs/ChangeGunMultiple";
|
||||
|
||||
// ---------------- HubsSend ----------------
|
||||
dic_API[APIType.Send_BindSuccess] = "/send/BindSuccess";
|
||||
dic_API[APIType.Send_ErrorMessage] = "/send/ErrorMessage";
|
||||
dic_API[APIType.Send_GetRoomListResult] = "/send/GetRoomListResult";
|
||||
dic_API[APIType.Send_KillNotice] = "/send/KillNotice";
|
||||
dic_API[APIType.Send_RoomChange] = "/send/RoomChange";
|
||||
dic_API[APIType.Send_RoomDisconnectNotice] = "/send/RoomDisconnectNotice";
|
||||
dic_API[APIType.Send_RoomJoinNotice] = "/send/RoomJoinNotice";
|
||||
dic_API[APIType.Send_RoomKillNotice] = "/send/RoomKillNotice";
|
||||
dic_API[APIType.Send_ChangeGunMultipleNotice] = "/send/ChangeGunMultipleNotice";
|
||||
dic_API[APIType.Send_RoomLeaveNotice] = "/send/RoomLeaveNotice";
|
||||
dic_API[APIType.Send_UsePropNotice] = "/send/UsePropNotice";
|
||||
dic_API[APIType.Send_SyncGameData] = "/send/SyncGameData";
|
||||
|
||||
// ---------------- ImageUpload ----------------
|
||||
dic_API[APIType.ImageUpload_Upload] = "/api/ImageUpload/upload";
|
||||
|
||||
// ---------------- Login ----------------
|
||||
dic_API[APIType.Login_GetAccessToken] = "/api/Login/GetAccessToken";
|
||||
dic_API[APIType.Login_GetSessionToken] = "/api/Login/GetSessionToken";
|
||||
dic_API[APIType.Login_RegisterWX] = "/api/Login/registerWX";
|
||||
dic_API[APIType.Login_Register] = "/api/Login/register";
|
||||
dic_API[APIType.Login_SendMobileCode] = "/api/Login/SendMobileCode";
|
||||
dic_API[APIType.Login_LoginWx] = "/api/Login/LoginWx";
|
||||
dic_API[APIType.Login_Login] = "/api/Login/Login";
|
||||
|
||||
// ---------------- Notice ----------------
|
||||
dic_API[APIType.Notice_Add] = "/api/Notice/add";
|
||||
dic_API[APIType.Notice_Update] = "/api/Notice/update";
|
||||
dic_API[APIType.Notice_Delete] = "/api/Notice/delete";
|
||||
dic_API[APIType.Notice_List] = "/api/Notice/list";
|
||||
dic_API[APIType.Notice_Get] = "/api/Notice/get";
|
||||
dic_API[APIType.Notice_GetNewOne] = "/api/Notice/get/newone";
|
||||
|
||||
// ---------------- System ----------------
|
||||
dic_API[APIType.System_AddUser] = "/api/System/user/add";
|
||||
}
|
||||
|
||||
// ---------------- GET ----------------
|
||||
static void GetSend<T>(string url, RequestParamBase request_Params, Action<T> action)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(IEGetSend<T>(url, request_Params, action));
|
||||
}
|
||||
|
||||
static IEnumerator IEGetSend<T>(string url, RequestParamBase paramObj, Action<T> action)
|
||||
{
|
||||
Debug.Log("url----" + url);
|
||||
// 将 RequestParamBase 转成 GET 参数
|
||||
if (paramObj != null)
|
||||
{
|
||||
var fields = paramObj.GetType().GetFields();
|
||||
List<string> paramList = new List<string>();
|
||||
|
||||
foreach (var f in fields)
|
||||
{
|
||||
object value = f.GetValue(paramObj);
|
||||
if (value != null)
|
||||
{
|
||||
string key = f.Name;
|
||||
string val = UnityWebRequest.EscapeURL(value.ToString());
|
||||
paramList.Add($"{key}={val}");
|
||||
}
|
||||
}
|
||||
|
||||
if (paramList.Count > 0)
|
||||
{
|
||||
url += "?" + string.Join("&", paramList);
|
||||
}
|
||||
}
|
||||
|
||||
using (UnityWebRequest req = UnityWebRequest.Get(url))
|
||||
{
|
||||
req.SetRequestHeader("Content-Type", "application/json");
|
||||
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
req.SetRequestHeader("token", token);
|
||||
|
||||
yield return req.SendWebRequest();
|
||||
|
||||
if (req.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
var json = req.downloadHandler.text;
|
||||
var res = JsonConvert.DeserializeObject<APIResponse<T>>(json);
|
||||
|
||||
// 自动保存 token
|
||||
if (typeof(T) == typeof(UserToken))
|
||||
{
|
||||
var ut = res.data as UserToken;
|
||||
if (ut != null) token = ut.token;
|
||||
Debug.Log("微信登录成功 Token" + token);
|
||||
|
||||
}
|
||||
Log(json + "\n------Get");
|
||||
if (res.code==0)
|
||||
{
|
||||
action?.Invoke(res.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorHandle(res.code, res.info);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(req.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- POST ----------------
|
||||
static void PostSend<T>(string url, APIRequest.RequestObjBase body, Action<T> action)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(IEPostSend<T>(url, body, action));
|
||||
}
|
||||
|
||||
static IEnumerator IEPostSend<T>(string url, APIRequest.RequestObjBase body, Action<T> action)
|
||||
{
|
||||
string upBodyJson = JsonConvert.SerializeObject(body);
|
||||
byte[] buff = Encoding.UTF8.GetBytes(upBodyJson);
|
||||
|
||||
using (UnityWebRequest req = new UnityWebRequest(url, "POST"))
|
||||
{
|
||||
req.SetRequestHeader("Content-Type", "application/json");
|
||||
req.downloadHandler = new DownloadHandlerBuffer();
|
||||
req.uploadHandler = new UploadHandlerRaw(buff);
|
||||
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
req.SetRequestHeader("token", token);
|
||||
|
||||
yield return req.SendWebRequest();
|
||||
|
||||
if (req.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
var json = req.downloadHandler.text;
|
||||
var res = JsonConvert.DeserializeObject<APIResponse<T>>(json);
|
||||
Log(json+"\n------Post");
|
||||
if (res.code == 0)
|
||||
{
|
||||
action?.Invoke(res.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorHandle(res.code, res.info);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(req.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- 调用入口 ----------------
|
||||
public static void Response<T>(APIType aPIType, RequestBase request, Action<T> action = null)
|
||||
{
|
||||
string url = baseURL + dic_API[aPIType];
|
||||
|
||||
if (request is RequestParamBase param)
|
||||
{
|
||||
GetSend<T>(url, param, action);
|
||||
}
|
||||
else if (request is APIRequest.RequestObjBase obj)
|
||||
{
|
||||
PostSend<T>(url, obj, action);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("RequestBase 不是 RequestParamBase 或 RequestObjBase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 无参
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="apiType"></param>
|
||||
/// <param name="action"></param>
|
||||
public static void Response<T>(APIType apiType,Action<T> action = null)
|
||||
{
|
||||
string url = baseURL + dic_API[apiType];
|
||||
GetSend<T>(url, null, action);
|
||||
|
||||
}
|
||||
public static void Log(string json)
|
||||
{
|
||||
Debug.Log(json);
|
||||
}
|
||||
public static void ErrorHandle(int code,string message)
|
||||
{
|
||||
|
||||
|
||||
Debug.LogError("错误代码:"+code+"错误信息:"+message);
|
||||
//这里之后补弹窗
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13e79319d07e62540a5da3e05206d466
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83c4354ea9324124e8436a66bfbd2220
|
||||
guid: 3742b7952195f744ebe774b7ac6d9d9b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42d4a7f9bf0a99d4aa73e875deb5c681
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest.Objs
|
||||
{
|
||||
public class RegisterObj:RequestObjBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户手机号
|
||||
/// </summary>
|
||||
public string mobile;
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
public string code;
|
||||
|
||||
/// <summary>
|
||||
/// 用户密码
|
||||
/// </summary>
|
||||
public string password;
|
||||
|
||||
/// <summary>
|
||||
/// 邀请码(可选)
|
||||
/// </summary>
|
||||
public string inviteCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f05dee8327f390345996e9bc6bd7b5e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd3351faa7d08ac429fc7d0f591008cb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest.Params
|
||||
{
|
||||
/// <summary>
|
||||
/// 存入保险箱请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SaveSafeBoxParam : RequestParamBase
|
||||
{
|
||||
|
||||
public int amount; // 存入金额
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置保险箱密码请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SetSafeBoxPasswordParam : RequestParamBase
|
||||
{
|
||||
public string newPwd; // 新密码
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置保险箱密码请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ResetSafeBoxPasswordParam : RequestParamBase
|
||||
{
|
||||
public string code; // 验证码
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 合成碎片请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SynthesisFragmentParam : RequestParamBase
|
||||
{
|
||||
public int fragmentId; // 碎片ID
|
||||
public int count; // 数量
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买月卡请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BuyMonthCardParam : RequestParamBase
|
||||
{
|
||||
public int cardType; // 月卡类型
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买道具请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BuyPropParam : RequestParamBase
|
||||
{
|
||||
public int propId; // 道具ID
|
||||
public int count; // 数量
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买金币请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BuyGoldParam : RequestParamBase
|
||||
{
|
||||
|
||||
public int goldAmount; // 金币数量
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买钻石请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BuyDiamondParam : RequestParamBase
|
||||
{
|
||||
|
||||
public int diamondAmount; // 钻石数量
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 切换炮台请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ChangeCannonParam : RequestParamBase
|
||||
{
|
||||
public int cannonId; // 炮台ID
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换翅膀请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ChangeWingParam : RequestParamBase
|
||||
{
|
||||
public int wingId; // 翅膀ID
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换战神请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ChangeGodWarParam : RequestParamBase
|
||||
{
|
||||
public int godWarId; // 战神ID
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发放奖励请求参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DistributeRewardsParam : RequestParamBase
|
||||
{
|
||||
public int rewardId; // 奖励ID
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3271e3fbc41bdd48a1570c8a3590cda
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest.Params
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录接口请求参数(GET)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class LoginParam : RequestParamBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户手机号
|
||||
/// </summary>
|
||||
public string mobile;
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
public string code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 582e61a25f518f442a86676473262ce0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest.Params
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信登录参数(GET)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class LoginWxParam : RequestParamBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信 openId
|
||||
/// </summary>
|
||||
public string openId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29497cb62414e664b9ec5ac7bfcaca31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest
|
||||
{
|
||||
[Serializable]
|
||||
public class RequestBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d4ba79dcbbaf7d44be612f1ab08165d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest
|
||||
{
|
||||
[Serializable]
|
||||
public class RequestObjBase : RequestBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82c03efb419bc1441a9ed94d1415e341
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest
|
||||
{
|
||||
[Serializable]
|
||||
public class RequestParamBase: RequestBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1057f00523fe3a548b4e936a23c99113
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,215 @@
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Objs;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Params;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses;
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net
|
||||
{
|
||||
public static partial class APIRequestList
|
||||
{
|
||||
#region Hall
|
||||
|
||||
/// <summary>
|
||||
/// 存入保险箱(POST)
|
||||
/// 参数:用户ID、存入金额
|
||||
/// 返回:SafeBoxInfo(保险箱余额信息)
|
||||
/// </summary>
|
||||
public static void SaveSafeBox(SaveSafeBoxParam req, Action<SafeBoxInfo> callback)
|
||||
{
|
||||
APIManager.Response<SafeBoxInfo>(APIType.Hall_SaveSafeBox, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取保险箱信息(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:SafeBoxInfo(保险箱余额信息)
|
||||
/// </summary>
|
||||
public static void GetSafeBox(Action<SafeBoxInfo> callback)
|
||||
{
|
||||
APIManager.Response<SafeBoxInfo>(APIType.Hall_GetSafeBox, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置保险箱密码(POST)
|
||||
/// 参数:用户ID、新密码
|
||||
/// 返回:StringBaseResponse(操作结果信息)
|
||||
/// </summary>
|
||||
public static void SetSafeBoxPassword(SetSafeBoxPasswordParam req, Action<StringBaseResponse> callback)
|
||||
{
|
||||
APIManager.Response<StringBaseResponse>(APIType.Hall_SetSafeBoxPassword, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置保险箱密码(POST)
|
||||
/// 参数:用户ID、验证码
|
||||
/// 返回:StringBaseResponse(操作结果信息)
|
||||
/// </summary>
|
||||
public static void ResetSafeBoxPassword(ResetSafeBoxPasswordParam req, Action<StringBaseResponse> callback)
|
||||
{
|
||||
APIManager.Response<StringBaseResponse>(APIType.Hall_ResetSafeBoxPassword, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取救济金(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:GetReliefResponse(救济金数量、提示信息)
|
||||
/// </summary>
|
||||
public static void GetRelief(Action<GetReliefResponse> callback)
|
||||
{
|
||||
APIManager.Response<GetReliefResponse>(APIType.Hall_GetRelief, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 合成碎片(POST)
|
||||
/// 参数:碎片ID、数量
|
||||
/// 返回:PropInfo(道具信息)
|
||||
/// </summary>
|
||||
public static void SynthesisFragment(SynthesisFragmentParam req, Action<PropInfo> callback)
|
||||
{
|
||||
APIManager.Response<PropInfo>(APIType.Hall_SynthesisFragment, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买月卡(POST)
|
||||
/// 参数:用户ID、月卡类型
|
||||
/// 返回:MonthCardInfo(月卡信息)
|
||||
/// </summary>
|
||||
public static void BuyMonthCard(BuyMonthCardParam req, Action<MonthCardInfo> callback)
|
||||
{
|
||||
APIManager.Response<MonthCardInfo>(APIType.Hall_BuyMonthCard, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买道具(POST)
|
||||
/// 参数:道具ID、数量
|
||||
/// 返回:PropInfo(道具信息)
|
||||
/// </summary>
|
||||
public static void BuyProp(BuyPropParam req, Action<PropInfo> callback)
|
||||
{
|
||||
APIManager.Response<PropInfo>(APIType.Hall_BuyProp, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买金币(POST)
|
||||
/// 参数:用户ID、金币数量
|
||||
/// 返回:GoldInfo(金币信息)
|
||||
/// </summary>
|
||||
public static void BuyGold(BuyGoldParam req, Action<GoldInfo> callback)
|
||||
{
|
||||
APIManager.Response<GoldInfo>(APIType.Hall_BuyGold, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 购买钻石(POST)
|
||||
/// 参数:用户ID、钻石数量
|
||||
/// 返回:DiamondInfo(钻石信息)
|
||||
/// </summary>
|
||||
public static void BuyDiamond(BuyDiamondParam req, Action<DiamondInfo> callback)
|
||||
{
|
||||
APIManager.Response<DiamondInfo>(APIType.Hall_BuyDiamond, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 签到(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:SignInfo(签到结果)
|
||||
/// </summary>
|
||||
public static void SignIn(Action<SignInfo> callback)
|
||||
{
|
||||
APIManager.Response<SignInfo>(APIType.Hall_SignIn, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换炮台(POST)
|
||||
/// 参数:炮台ID
|
||||
/// 返回:UserInfo(用户信息)
|
||||
/// </summary>
|
||||
public static void ChangeCannon(ChangeCannonParam req, Action<UserInfo> callback)
|
||||
{
|
||||
APIManager.Response<UserInfo>(APIType.Hall_ChangeCannon, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换翅膀(POST)
|
||||
/// 参数:翅膀ID
|
||||
/// 返回:UserInfo(用户信息)
|
||||
/// </summary>
|
||||
public static void ChangeWing(ChangeWingParam req, Action<UserInfo> callback)
|
||||
{
|
||||
APIManager.Response<UserInfo>(APIType.Hall_ChangeWing, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换战神(POST)
|
||||
/// 参数:战神ID
|
||||
/// 返回:UserInfo(用户信息)
|
||||
/// </summary>
|
||||
public static void ChangeGodWar(ChangeGodWarParam req, Action<UserInfo> callback)
|
||||
{
|
||||
APIManager.Response<UserInfo>(APIType.Hall_ChangeGodWar, req, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取 Vip 每日礼包(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:GiftInfo(礼包信息)
|
||||
/// </summary>
|
||||
public static void GetVipDayGift( Action<GiftInfo> callback)
|
||||
{
|
||||
APIManager.Response<GiftInfo>(APIType.Hall_GetVipDayGift, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取 Vip 权益礼包(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:GiftInfo(礼包信息)
|
||||
/// </summary>
|
||||
public static void GetVipGift(Action<GiftInfo> callback)
|
||||
{
|
||||
APIManager.Response<GiftInfo>(APIType.Hall_GetVipGift, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取月卡每日礼包(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:GiftInfo(礼包信息)
|
||||
/// </summary>
|
||||
public static void GetMonthCardDayGift(Action<GiftInfo> callback)
|
||||
{
|
||||
APIManager.Response<GiftInfo>(APIType.Hall_GetMonthCardDayGift, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取月卡权益礼包(GET)
|
||||
/// 参数:用户ID
|
||||
/// 返回:GiftInfo(礼包信息)
|
||||
/// </summary>
|
||||
public static void GetMonthCardGift( Action<GiftInfo> callback)
|
||||
{
|
||||
APIManager.Response<GiftInfo>(APIType.Hall_GetMonthCardGift,callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户任务列表(Get)
|
||||
/// 参数:用户ID
|
||||
/// 返回:UserTaskListResponse(任务列表)
|
||||
/// </summary>
|
||||
public static void GetUserTaskList(Action<UserTaskListResponse> callback)
|
||||
{
|
||||
APIManager.Response<UserTaskListResponse>(APIType.Hall_GetUserTaskList, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发放奖励(POST)
|
||||
/// 参数:奖励ID、用户ID
|
||||
/// 返回:RewardInfo(奖励信息)
|
||||
/// </summary>
|
||||
public static void DistributeRewards(DistributeRewardsParam req, Action<RewardInfo> callback)
|
||||
{
|
||||
APIManager.Response<RewardInfo>(APIType.Hall_DistributeRewards, req, callback);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccf916a5fe02f224cb8bff2eb884319a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
using Assets.MyGame.Scripts.Net.API;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Objs;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Params;
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net
|
||||
{
|
||||
public static partial class APIRequestList
|
||||
{
|
||||
static void lizi()
|
||||
{
|
||||
APIRequestList.Login(
|
||||
new LoginParam { mobile = "13800138000", code = "1234" },
|
||||
res =>
|
||||
{
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
APIRequestList.Register(
|
||||
new RegisterObj { mobile = "13800138000", code = "1234", password = "abc123" },
|
||||
res =>
|
||||
{
|
||||
|
||||
}
|
||||
);
|
||||
APIRequestList.LoginWx(
|
||||
new LoginWxParam
|
||||
{
|
||||
openId = "wx_openid_123456"
|
||||
},
|
||||
res =>
|
||||
{
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
#region Login
|
||||
/// <summary>
|
||||
/// 微信用户登录(GET)
|
||||
/// Swagger Summary: 微信用户登陆
|
||||
/// 参数:
|
||||
/// openId: 微信 openId
|
||||
/// 返回:
|
||||
/// UserToken(包含 token、用户信息等)
|
||||
/// </summary>
|
||||
public static void LoginWx(LoginWxParam req, Action<UserToken> callback)
|
||||
{
|
||||
APIManager.Response<UserToken>(APIType.Login_LoginWx, req, obj =>
|
||||
{
|
||||
GameManager.Instance.user = obj;
|
||||
callback?.Invoke(obj);
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 登录(GET)
|
||||
/// </summary>
|
||||
public static void Login(LoginParam req, Action<UserToken> callback)
|
||||
{
|
||||
APIManager.Response<UserToken>(APIType.Login_Login, req, obj =>
|
||||
{
|
||||
GameManager.Instance.user=obj;
|
||||
callback?.Invoke(obj);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册(POST)
|
||||
/// </summary>
|
||||
public static void Register(RegisterObj req, Action<UserToken> callback)
|
||||
{
|
||||
APIManager.Response<UserToken>(APIType.Login_Register, req, obj =>
|
||||
{
|
||||
callback?.Invoke(obj);
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 893fcc8ccbbc2194a900551eee4164d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2d510566bde68b4eb5922f232f2dc88
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
[Serializable]
|
||||
public class APIResponse<T>
|
||||
{
|
||||
public int code;
|
||||
public string info;
|
||||
public T data;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7729fa2401e95b247aa79db094c509ad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API
|
||||
{
|
||||
public class APIRespostData<T>
|
||||
{
|
||||
public APIType aPIType;
|
||||
public APIResponse<T> Data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: feff170bf46dafa47b471092d653db0b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70b880f328074264aac7137d78c21612
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 鱼的类型枚举类
|
||||
/// </summary>
|
||||
public enum FishTypeEnum
|
||||
{
|
||||
普通鱼=1,
|
||||
Boss鱼=2,
|
||||
黄金鱼=3,
|
||||
特殊鱼=4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f8e11d6652a9884d90b2ddeff055fd1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏类型枚举
|
||||
/// </summary>
|
||||
public enum GameTypeEnum
|
||||
{
|
||||
风雷之渊=1,
|
||||
太古仙墟=2,
|
||||
中国象棋=3,
|
||||
星际迷航=4,
|
||||
黑神话悟空=5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5d1299a2705b9e4bb77c001c11815cf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品分类枚举
|
||||
/// </summary>
|
||||
public enum ProductTypeEnum
|
||||
{
|
||||
炮台=1,
|
||||
翅膀=2,
|
||||
炮塔碎片 = 3,
|
||||
翅膀碎片=4,
|
||||
战神=5,
|
||||
战神碎片=6,
|
||||
刮刮卡=7,
|
||||
改名卡=8,
|
||||
大喇叭=9,
|
||||
技能=10,
|
||||
召唤卡=11,
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26eed7fc3646cc84cbd8f11d4f8dc072
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 售卖方式
|
||||
/// </summary>
|
||||
public enum SaleTypeEnum
|
||||
{
|
||||
金币=1,
|
||||
钻石=2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6720e06fa5b608c40826dfdd0216d998
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务类型枚举
|
||||
/// </summary>
|
||||
public enum TaskType
|
||||
{
|
||||
|
||||
每日任务=1,
|
||||
在线时长任务=2
|
||||
}
|
||||
/// <summary>
|
||||
/// 任务事件
|
||||
/// </summary>
|
||||
public enum TaskEvent
|
||||
{
|
||||
整点在线奖励=1,
|
||||
在线时长=2,
|
||||
捕获任意鱼=3,
|
||||
捕获黄金鱼 =4,
|
||||
捕获Boss鱼=5,
|
||||
赢取金币=6,
|
||||
使用狂暴=7,
|
||||
开炮任务=8,
|
||||
登录任务=9,
|
||||
充值任务=10
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb25f2597de78114391b5a31d9655e26
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户资产变动类型枚举类
|
||||
/// </summary>
|
||||
public enum UserAssetChangeTypeEnum
|
||||
{
|
||||
增加=1,
|
||||
减少=2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad19ad2134b48ce40a44874609200aac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,99 @@
|
||||
using Assets.MyGame.Scripts.Net.API.GameConfig_SubClass;
|
||||
using Assets.MyGame.Scripts.Net.API.UserData_SubClass;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
namespace Assets.MyGame.Scripts.Net.API
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏后台配置(Unity 解析版)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GameConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据id(来自 MongoBaseEntity)
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
/// </summary>
|
||||
public bool isDelete;
|
||||
|
||||
/// <summary>
|
||||
/// 创建人信息
|
||||
/// </summary>
|
||||
public OptionUserInfo createInfo;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼种配置
|
||||
/// </summary>
|
||||
public List<FishTypeConfig> fishTypeConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 房间配置
|
||||
/// </summary>
|
||||
public List<RoomConfig> roomConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 出鱼配置
|
||||
/// </summary>
|
||||
public List<RoomFishConfig> roomFishConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼阵配置
|
||||
/// </summary>
|
||||
public List<FishArrayConfig> fishArrayConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 用户等级配置
|
||||
/// </summary>
|
||||
public List<UserLevelConfig> userLevelConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 道具表
|
||||
/// </summary>
|
||||
public List<PropInfConfig> propConfig;
|
||||
|
||||
/// <summary>
|
||||
/// 道具碎片表
|
||||
/// </summary>
|
||||
public List<PropFragmentConfig> propFragments;
|
||||
|
||||
/// <summary>
|
||||
/// Vip等级配置
|
||||
/// </summary>
|
||||
public List<VipLevelConfig> vipLevelConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 签到池配置
|
||||
/// </summary>
|
||||
public List<SignConfig> signConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 月卡配置
|
||||
/// </summary>
|
||||
public List<MonthCardConfig> monthCardConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 救济金配置
|
||||
/// </summary>
|
||||
public ReliefConfig reliefConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 金币商城配置
|
||||
/// </summary>
|
||||
public List<GoldShopConfig> goldShopConfigs;
|
||||
|
||||
/// <summary>
|
||||
/// 钻石商城配置
|
||||
/// </summary>
|
||||
public List<DiamondShopConfig> diamondShopConfigs;
|
||||
/// <summary>
|
||||
/// 击杀配置
|
||||
/// </summary>
|
||||
|
||||
public object killConfig ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d64884df8d4ebb4a840178a14ebb3bc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60ccdcd2dfde0fe43b3aea0b089a06b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础商品信息
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BaseProduct
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品编号
|
||||
/// </summary>
|
||||
public string number;
|
||||
|
||||
/// <summary>
|
||||
/// 商品名称
|
||||
/// </summary>
|
||||
public string name;
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string desc;
|
||||
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string imageUrl;
|
||||
|
||||
/// <summary>
|
||||
/// 商品类型
|
||||
/// </summary>
|
||||
public int type;
|
||||
|
||||
/// <summary>
|
||||
/// 道具等级
|
||||
/// </summary>
|
||||
public int level;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d4070515a8b636408308ff933825acb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品 + 数量
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BaseProductCount : BaseProduct
|
||||
{
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public int count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 345e08ff5b63d2747bb8c95beca337bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具基础信息
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BasePropInfo : BaseProduct
|
||||
{
|
||||
/// <summary>
|
||||
/// 售卖方式(金币/钻石)
|
||||
/// </summary>
|
||||
public int saleType;
|
||||
|
||||
/// <summary>
|
||||
/// 售卖价格
|
||||
/// </summary>
|
||||
public int price;
|
||||
|
||||
/// <summary>
|
||||
/// 售卖数量
|
||||
/// </summary>
|
||||
public int saleCount;
|
||||
|
||||
/// <summary>
|
||||
/// 会员价格
|
||||
/// </summary>
|
||||
public int vipPrice;
|
||||
|
||||
/// <summary>
|
||||
/// 经销商价格
|
||||
/// </summary>
|
||||
public int dealerPrice;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool isEnable;
|
||||
|
||||
/// <summary>
|
||||
/// 是否销售
|
||||
/// </summary>
|
||||
public bool isSale;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe471ad901872af45b56ba9eebbbd599
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 钻石商城配置
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DiamondShopConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品编号
|
||||
/// </summary>
|
||||
public string number;
|
||||
|
||||
/// <summary>
|
||||
/// 商品名称
|
||||
/// </summary>
|
||||
public string name;
|
||||
|
||||
/// <summary>
|
||||
/// 图标地址
|
||||
/// </summary>
|
||||
public string icon;
|
||||
|
||||
/// <summary>
|
||||
/// 钻石数量
|
||||
/// </summary>
|
||||
public int diamond;
|
||||
|
||||
/// <summary>
|
||||
/// 现金价格
|
||||
/// </summary>
|
||||
public double money;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ba6f28a1e8c9dc4a8d524dec60ea4ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 鱼阵配置
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FishArrayConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 鱼阵编号
|
||||
/// </summary>
|
||||
public string fishArrayNumber;
|
||||
|
||||
/// <summary>
|
||||
/// 名字
|
||||
/// </summary>
|
||||
public string name;
|
||||
|
||||
/// <summary>
|
||||
/// Boss鱼编号
|
||||
/// </summary>
|
||||
public string bossFishNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Boss数量
|
||||
/// </summary>
|
||||
public int boosCount;
|
||||
|
||||
/// <summary>
|
||||
/// 普通鱼编号
|
||||
/// </summary>
|
||||
public string fishNumber;
|
||||
|
||||
/// <summary>
|
||||
/// 普通鱼数量
|
||||
/// </summary>
|
||||
public int fishCount;
|
||||
|
||||
/// <summary>
|
||||
/// 阵型编号
|
||||
/// </summary>
|
||||
public string arrayNumber;
|
||||
|
||||
/// <summary>
|
||||
/// 路径集合
|
||||
/// </summary>
|
||||
public List<int> pathList;
|
||||
|
||||
/// <summary>
|
||||
/// 阈值集合
|
||||
/// </summary>
|
||||
public List<int> thresholdList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5ebaae18a483ab47b8c2d921c75ce24
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 鱼种配置
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FishTypeConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 鱼种编号
|
||||
/// </summary>
|
||||
public string fishNumber;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼名字
|
||||
/// </summary>
|
||||
public string fishName;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼类型(普通鱼/Boss鱼/黄金鱼…)
|
||||
/// </summary>
|
||||
public int fishType;
|
||||
|
||||
/// <summary>
|
||||
/// 基础分数
|
||||
/// </summary>
|
||||
public int fishScore;
|
||||
|
||||
/// <summary>
|
||||
/// 击杀权重
|
||||
/// </summary>
|
||||
public int killWeight;
|
||||
|
||||
/// <summary>
|
||||
/// 路径编号集合
|
||||
/// </summary>
|
||||
public List<int> pathList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 082fb3f96c7ba4a42abd4a7c4b7bad68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user