com.xmobitea.changx.gn-unity 2.0.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/GNServerSettingsEditor.cs +16 -300
- package/Runtime/Common/GNArray.cs +387 -302
- package/Runtime/Common/GNArray.cs.meta +11 -11
- package/Runtime/Common/GNData.cs +61 -48
- package/Runtime/Common/GNData.cs.meta +11 -11
- package/Runtime/Common/GNHashtable.cs +404 -241
- package/Runtime/Common/GNHashtable.cs.meta +11 -11
- package/Runtime/Common/IGNData.cs +20 -11
- package/Runtime/Common/IGNData.cs.meta +11 -11
- package/Runtime/Common.meta +8 -8
- package/Runtime/Config/GNServerSettings.cs +136 -92
- package/Runtime/Config/GNServerSettings.cs.meta +11 -11
- package/Runtime/Config.meta +8 -8
- package/Runtime/Constant/Commands.cs +82 -19
- package/Runtime/Constant/Commands.cs.meta +11 -11
- package/Runtime/Constant/EnumType/FriendStatus.cs +12 -12
- package/Runtime/Constant/EnumType/FriendStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GoogleLoginType.cs +5 -5
- package/Runtime/Constant/EnumType/GoogleLoginType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GroupStatus.cs +7 -7
- package/Runtime/Constant/EnumType/GroupStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/InvalidMemberType.cs +23 -23
- package/Runtime/Constant/EnumType/InvalidMemberType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/ItemType.cs +5 -5
- package/Runtime/Constant/EnumType/ItemType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs +6 -6
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs +2 -2
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/OwnerType.cs +3 -2
- package/Runtime/Constant/EnumType/OwnerType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PermissionDataItem.cs +10 -10
- package/Runtime/Constant/EnumType/PermissionDataItem.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PushPlatformType.cs +10 -0
- package/Runtime/Constant/EnumType/PushPlatformType.cs.meta +11 -0
- package/Runtime/Constant/EnumType/RequestRole.cs +11 -11
- package/Runtime/Constant/EnumType/RequestRole.cs.meta +7 -7
- package/Runtime/Constant/EnumType/RequestType.cs +20 -19
- package/Runtime/Constant/EnumType/RequestType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/StoreReceiveType.cs +13 -0
- package/Runtime/Constant/EnumType/StoreReceiveType.cs.meta +11 -0
- package/Runtime/Constant/EnumType.meta +8 -8
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs +53 -48
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs.meta +7 -7
- package/Runtime/Constant/ErrorCode.meta +8 -8
- package/Runtime/Constant/EventCode.cs +43 -16
- package/Runtime/Constant/EventCode.cs.meta +11 -11
- package/Runtime/Constant/OperationCode.cs +249 -211
- package/Runtime/Constant/OperationCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs +614 -466
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/ParameterCode.cs +12 -12
- package/Runtime/Constant/ParameterCode/ParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode.meta +8 -8
- package/Runtime/Constant/ReturnCode.cs +73 -25
- package/Runtime/Constant/ReturnCode.cs.meta +11 -11
- package/Runtime/Constant.meta +8 -8
- package/Runtime/Entity/DataMember.cs +342 -124
- package/Runtime/Entity/DataMember.cs.meta +11 -11
- package/Runtime/Entity/GNMetadata.cs +72 -27
- package/Runtime/Entity/GNMetadata.cs.meta +11 -11
- package/Runtime/Entity/InvalidMember.cs +52 -33
- package/Runtime/Entity/InvalidMember.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateModels.cs +251 -207
- package/Runtime/Entity/Models/AuthenticateModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs +153 -131
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs +61 -51
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerModels.cs +985 -849
- package/Runtime/Entity/Models/CharacterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs +957 -885
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs +165 -150
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CloudScriptModels.cs +185 -0
- package/Runtime/Entity/Models/CloudScriptModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs +134 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs +34 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs.meta +11 -0
- package/Runtime/Entity/Models/ContentModels.cs +150 -153
- package/Runtime/Entity/Models/ContentModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentRequestModels.cs +129 -129
- package/Runtime/Entity/Models/ContentRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentResponseModels.cs +24 -24
- package/Runtime/Entity/Models/ContentResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardModels.cs +1684 -1156
- package/Runtime/Entity/Models/DashboardModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardRequestModels.cs +220 -147
- package/Runtime/Entity/Models/DashboardRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardResponseModels.cs +92 -57
- package/Runtime/Entity/Models/DashboardResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerModels.cs +1073 -933
- package/Runtime/Entity/Models/GamePlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs +939 -867
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs +162 -147
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GenericModels.cs +102 -102
- package/Runtime/Entity/Models/GenericModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupModels.cs +812 -676
- package/Runtime/Entity/Models/GroupModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupRequestModels.cs +741 -669
- package/Runtime/Entity/Models/GroupRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupResponseModels.cs +129 -114
- package/Runtime/Entity/Models/GroupResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryModels.cs +667 -558
- package/Runtime/Entity/Models/InventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryRequestModels.cs +626 -579
- package/Runtime/Entity/Models/InventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryResponseModels.cs +109 -99
- package/Runtime/Entity/Models/InventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerModels.cs +1882 -1340
- package/Runtime/Entity/Models/MasterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs +1643 -1253
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs +293 -213
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerModels.cs +293 -223
- package/Runtime/Entity/Models/MultiplayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs +199 -149
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs +59 -49
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryModels.cs +514 -323
- package/Runtime/Entity/Models/StoreInventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs +236 -165
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs +45 -30
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models.meta +8 -8
- package/Runtime/Entity/OperationEvent.cs +111 -75
- package/Runtime/Entity/OperationEvent.cs.meta +11 -11
- package/Runtime/Entity/OperationHelper.cs +51 -35
- package/Runtime/Entity/OperationHelper.cs.meta +11 -11
- package/Runtime/Entity/OperationRequest.cs +142 -99
- package/Runtime/Entity/OperationRequest.cs.meta +11 -11
- package/Runtime/Entity/OperationResponse.cs +111 -63
- package/Runtime/Entity/OperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Request/CustomOperationRequest.cs +112 -61
- package/Runtime/Entity/Request/CustomOperationRequest.cs.meta +11 -11
- package/Runtime/Entity/Request.meta +8 -8
- package/Runtime/Entity/Response/CustomOperationResponse.cs +84 -63
- package/Runtime/Entity/Response/CustomOperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Response.meta +8 -8
- package/Runtime/Entity.meta +8 -8
- package/Runtime/GNNetwork.cs +501 -182
- package/Runtime/GNNetwork.cs.meta +11 -11
- package/Runtime/GNNetworkApi.cs +38 -19
- package/Runtime/GNNetworkApi.cs.meta +11 -11
- package/Runtime/GNNetworkAuthenticateApi.cs +531 -98
- package/Runtime/GNNetworkAuthenticateApi.cs.meta +11 -11
- package/Runtime/GNNetworkCharacterPlayerApi.cs +1587 -762
- package/Runtime/GNNetworkCharacterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkCloudScriptApi.cs +181 -0
- package/Runtime/GNNetworkCloudScriptApi.cs.meta +11 -0
- package/Runtime/GNNetworkContentApi.cs +238 -132
- package/Runtime/GNNetworkContentApi.cs.meta +11 -11
- package/Runtime/GNNetworkDashboardApi.cs +278 -117
- package/Runtime/GNNetworkDashboardApi.cs.meta +11 -11
- package/Runtime/GNNetworkGamePlayerApi.cs +1558 -747
- package/Runtime/GNNetworkGamePlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkGroupApi.cs +1228 -582
- package/Runtime/GNNetworkGroupApi.cs.meta +11 -11
- package/Runtime/GNNetworkInventoryApi.cs +1048 -507
- package/Runtime/GNNetworkInventoryApi.cs.meta +11 -11
- package/Runtime/GNNetworkMasterPlayerApi.cs +2586 -1067
- package/Runtime/GNNetworkMasterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkMultiplayerApi.cs +328 -147
- package/Runtime/GNNetworkMultiplayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkStoreInventoryApi.cs +388 -162
- package/Runtime/GNNetworkStoreInventoryApi.cs.meta +11 -11
- package/Runtime/Helper/CodeHelper.cs +140 -98
- package/Runtime/Helper/CodeHelper.cs.meta +11 -11
- package/Runtime/Helper/ConverterService.cs +236 -52
- package/Runtime/Helper/ConverterService.cs.meta +11 -11
- package/Runtime/Helper/ParseGNHelper.cs +451 -451
- package/Runtime/Helper/ParseGNHelper.cs.meta +11 -11
- package/Runtime/Helper.meta +8 -8
- package/Runtime/Logger/GNDebug.cs +92 -49
- package/Runtime/Logger/GNDebug.cs.meta +11 -11
- package/Runtime/Logger.meta +8 -8
- package/Runtime/Networking/AuthenticateStatus.cs +57 -35
- package/Runtime/Networking/AuthenticateStatus.cs.meta +11 -11
- package/Runtime/Networking/Handler/IServerEventHandler.cs +25 -25
- package/Runtime/Networking/Handler/IServerEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs +61 -32
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +54 -33
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +48 -29
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +47 -29
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler.meta +8 -8
- package/Runtime/Networking/Http/HttpPeer.cs +68 -25
- package/Runtime/Networking/Http/HttpPeer.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +65 -25
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +513 -486
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +172 -142
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +225 -188
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs.meta +11 -11
- package/Runtime/Networking/Http.meta +8 -8
- package/Runtime/Networking/IPeer.cs +41 -19
- package/Runtime/Networking/IPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeer.cs +198 -144
- package/Runtime/Networking/NetworkingPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeerAPI.cs +20 -21
- package/Runtime/Networking/NetworkingPeerAPI.cs.meta +11 -11
- package/Runtime/Networking/OperationPending.cs +159 -95
- package/Runtime/Networking/OperationPending.cs.meta +11 -11
- package/Runtime/Networking/PeerBase.cs +305 -242
- package/Runtime/Networking/PeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs +222 -185
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs +235 -177
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs +165 -23
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/SocketPeer.cs +242 -197
- package/Runtime/Networking/Socket/SocketPeer.cs.meta +11 -11
- package/Runtime/Networking/Socket.meta +8 -8
- package/Runtime/Networking.meta +8 -8
- package/Runtime/Unity/ServiceCoroutine.cs +10 -0
- package/Runtime/Unity/ServiceCoroutine.cs.meta +11 -0
- package/Runtime/Unity/ServiceUpdate.cs +33 -20
- package/Runtime/Unity/ServiceUpdate.cs.meta +11 -11
- package/Runtime/Unity.meta +8 -8
- package/Runtime/XmobiTea.GN.runtime.asmdef +16 -16
- package/Runtime/XmobiTea.GN.runtime.asmdef.meta +7 -7
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: e17c54504be90db46a4306e7c643af43
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: e17c54504be90db46a4306e7c643af43
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Runtime/Helper.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a777c77e58fd1114880c52bd552936af
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a777c77e58fd1114880c52bd552936af
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,49 +1,92 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Logger
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
namespace XmobiTea.GN.Logger
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Enum defining different log levels for GNDebug.
|
|
7
|
+
/// </summary>
|
|
8
|
+
public enum LogType
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// No logging.
|
|
12
|
+
/// </summary>
|
|
13
|
+
Off,
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// Logs exceptions only.
|
|
17
|
+
/// </summary>
|
|
18
|
+
Exception,
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// Logs errors and exceptions.
|
|
22
|
+
/// </summary>
|
|
23
|
+
Error,
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
/// Logs warnings, errors, and exceptions.
|
|
27
|
+
/// </summary>
|
|
28
|
+
Warning,
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
/// Logs all messages, including general logs, warnings, errors, and exceptions.
|
|
32
|
+
/// </summary>
|
|
33
|
+
All,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
/// Utility class for handling logging in the GN framework.
|
|
38
|
+
/// </summary>
|
|
39
|
+
internal class GNDebug
|
|
40
|
+
{
|
|
41
|
+
private static LogType _logType; // Current log level.
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
/// Gets or sets the current log level for GNDebug.
|
|
45
|
+
/// </summary>
|
|
46
|
+
public static LogType logType
|
|
47
|
+
{
|
|
48
|
+
get => _logType;
|
|
49
|
+
set => _logType = value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
/// Logs a general message if the log level includes general logs.
|
|
54
|
+
/// </summary>
|
|
55
|
+
/// <param name="message">The message to log.</param>
|
|
56
|
+
public static void log(object message)
|
|
57
|
+
{
|
|
58
|
+
if (_logType >= LogType.All)
|
|
59
|
+
UnityEngine.Debug.Log(message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
/// Logs an exception if the log level includes exceptions.
|
|
64
|
+
/// </summary>
|
|
65
|
+
/// <param name="exception">The exception to log.</param>
|
|
66
|
+
public static void logException(Exception exception)
|
|
67
|
+
{
|
|
68
|
+
if (_logType >= LogType.Exception)
|
|
69
|
+
UnityEngine.Debug.LogException(exception);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/// <summary>
|
|
73
|
+
/// Logs a warning message if the log level includes warnings.
|
|
74
|
+
/// </summary>
|
|
75
|
+
/// <param name="message">The warning message to log.</param>
|
|
76
|
+
public static void logWarning(object message)
|
|
77
|
+
{
|
|
78
|
+
if (_logType >= LogType.Warning)
|
|
79
|
+
UnityEngine.Debug.LogWarning(message);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// <summary>
|
|
83
|
+
/// Logs an error message if the log level includes errors.
|
|
84
|
+
/// </summary>
|
|
85
|
+
/// <param name="message">The error message to log.</param>
|
|
86
|
+
public static void logError(object message)
|
|
87
|
+
{
|
|
88
|
+
if (_logType >= LogType.Error)
|
|
89
|
+
UnityEngine.Debug.LogError(message);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 9f669894cbb6d82468a31b23fc5041c6
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 9f669894cbb6d82468a31b23fc5041c6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Runtime/Logger.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 214d28849c4fe9949ba1a1cf8e0219ac
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 214d28849c4fe9949ba1a1cf8e0219ac
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,35 +1,57 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Networking
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
namespace XmobiTea.GN.Networking
|
|
2
|
+
{
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// Represents the authentication status of a user.
|
|
5
|
+
/// </summary>
|
|
6
|
+
public class AuthenticateStatus
|
|
7
|
+
{
|
|
8
|
+
private string authToken; // Stores the authentication token.
|
|
9
|
+
private string userId; // Stores the user ID.
|
|
10
|
+
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// Gets the authentication token.
|
|
13
|
+
/// </summary>
|
|
14
|
+
/// <returns>The current authentication token.</returns>
|
|
15
|
+
public string getAuthToken()
|
|
16
|
+
{
|
|
17
|
+
return this.authToken;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// Sets the authentication token.
|
|
22
|
+
/// </summary>
|
|
23
|
+
/// <param name="authToken">The authentication token to set.</param>
|
|
24
|
+
internal void setAuthToken(string authToken)
|
|
25
|
+
{
|
|
26
|
+
this.authToken = authToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Uncomment this method if needed in the future to validate login and token expiry.
|
|
30
|
+
// /// <summary>
|
|
31
|
+
// /// Checks if the user is logged in and the authentication token is valid.
|
|
32
|
+
// /// </summary>
|
|
33
|
+
// /// <returns>True if logged in and valid, otherwise false.</returns>
|
|
34
|
+
// public bool isLoginAndValid()
|
|
35
|
+
// {
|
|
36
|
+
// return string.IsNullOrEmpty(this.authToken) && (authTokenTsExpire == -1 || GNNetwork.getServerTimestamp() < authTokenTsExpire);
|
|
37
|
+
// }
|
|
38
|
+
|
|
39
|
+
/// <summary>
|
|
40
|
+
/// Gets the user ID.
|
|
41
|
+
/// </summary>
|
|
42
|
+
/// <returns>The current user ID.</returns>
|
|
43
|
+
public string getUserId()
|
|
44
|
+
{
|
|
45
|
+
return this.userId;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// Sets the user ID.
|
|
50
|
+
/// </summary>
|
|
51
|
+
/// <param name="userId">The user ID to set.</param>
|
|
52
|
+
internal void setUserId(string userId)
|
|
53
|
+
{
|
|
54
|
+
this.userId = userId;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 9da4554a56b32ef4bb9f1bc06e7e94ba
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 9da4554a56b32ef4bb9f1bc06e7e94ba
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Networking
|
|
2
|
-
{
|
|
3
|
-
using XmobiTea.GN.Entity;
|
|
4
|
-
|
|
5
|
-
/// <summary>
|
|
6
|
-
///
|
|
7
|
-
///
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
///
|
|
12
|
-
///
|
|
13
|
-
///
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
///
|
|
19
|
-
///
|
|
20
|
-
///
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Networking
|
|
2
|
+
{
|
|
3
|
+
using XmobiTea.GN.Entity;
|
|
4
|
+
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Defines an interface for handling server events.
|
|
7
|
+
/// Classes that implement this interface must define how to handle specific events.
|
|
8
|
+
/// </summary>
|
|
9
|
+
public interface IServerEventHandler
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// Gets the event code associated with the handler.
|
|
13
|
+
/// The event codes should be defined in the EventCode file.
|
|
14
|
+
/// </summary>
|
|
15
|
+
/// <returns>An integer representing the event code.</returns>
|
|
16
|
+
int getEventCode();
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// Handles the specified operation event.
|
|
20
|
+
/// This method defines how to process the provided event.
|
|
21
|
+
/// </summary>
|
|
22
|
+
/// <param name="operationEvent">The operation event that needs to be handled.</param>
|
|
23
|
+
void handle(OperationEvent operationEvent);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 5989dacdf8a392b43b40c0926cba9658
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 5989dacdf8a392b43b40c0926cba9658
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,32 +1,61 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Networking
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using XmobiTea.GN.Constant;
|
|
6
|
-
using XmobiTea.GN.Entity;
|
|
7
|
-
using XmobiTea.GN.Entity.Models;
|
|
8
|
-
using XmobiTea.GN.Helper;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
public
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
namespace XmobiTea.GN.Networking
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using XmobiTea.GN.Constant;
|
|
6
|
+
using XmobiTea.GN.Entity;
|
|
7
|
+
using XmobiTea.GN.Entity.Models;
|
|
8
|
+
using XmobiTea.GN.Helper;
|
|
9
|
+
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// Represents the data structure for updating a character's player friend list.
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class CharacterPlayerFriendUpdate
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// The character ID.
|
|
17
|
+
/// </summary>
|
|
18
|
+
[StringDataMember(code = GNParameterCode.CharacterId)]
|
|
19
|
+
public string characterId;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
/// A list of player friends associated with the character.
|
|
23
|
+
/// </summary>
|
|
24
|
+
[GNArrayDataMember(code = GNParameterCode.PlayerFriends, elementCls = typeof(GenericModels.FriendItem))]
|
|
25
|
+
public List<GenericModels.FriendItem> playerFriends;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// Handles the "OnCharacterPlayerFriendUpdate" event.
|
|
30
|
+
/// This handler processes the event and triggers the corresponding update logic.
|
|
31
|
+
/// </summary>
|
|
32
|
+
public class OnCharacterPlayerFriendUpdateEventHandler : IServerEventHandler
|
|
33
|
+
{
|
|
34
|
+
/// <summary>
|
|
35
|
+
/// Event triggered when a character's player friend list is updated.
|
|
36
|
+
/// Subscribing to this action allows handling the update logic.
|
|
37
|
+
/// </summary>
|
|
38
|
+
public static Action<CharacterPlayerFriendUpdate> onUpdate;
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
/// Gets the event code associated with this handler.
|
|
42
|
+
/// </summary>
|
|
43
|
+
/// <returns>
|
|
44
|
+
/// The event code for "OnCharacterPlayerFriendUpdate".
|
|
45
|
+
/// </returns>
|
|
46
|
+
public int getEventCode() => EventCode.OnCharacterPlayerFriendUpdate;
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// Handles the "OnCharacterPlayerFriendUpdate" operation event.
|
|
50
|
+
/// This method deserializes the event parameters and invokes the update action.
|
|
51
|
+
/// </summary>
|
|
52
|
+
/// <param name="operationEvent">
|
|
53
|
+
/// The operation event containing the parameters for the character player friend update.
|
|
54
|
+
/// </param>
|
|
55
|
+
public void handle(OperationEvent operationEvent)
|
|
56
|
+
{
|
|
57
|
+
// Deserialize the event parameters and invoke the onUpdate action.
|
|
58
|
+
OnCharacterPlayerFriendUpdateEventHandler.onUpdate?.Invoke(ConverterService.deserializeObject<CharacterPlayerFriendUpdate>(operationEvent.getParameters()));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 18c2eeebd6c30a543bc53152528adcef
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 18c2eeebd6c30a543bc53152528adcef
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,33 +1,54 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Networking
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using XmobiTea.GN.Constant;
|
|
6
|
-
using XmobiTea.GN.Entity;
|
|
7
|
-
using XmobiTea.GN.Entity.Models;
|
|
8
|
-
using XmobiTea.GN.Helper;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
namespace XmobiTea.GN.Networking
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using XmobiTea.GN.Constant;
|
|
6
|
+
using XmobiTea.GN.Entity;
|
|
7
|
+
using XmobiTea.GN.Entity.Models;
|
|
8
|
+
using XmobiTea.GN.Helper;
|
|
9
|
+
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// Represents the data structure for updating a character's player group list.
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class CharacterPlayerGroupUpdate
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// The character ID.
|
|
17
|
+
/// </summary>
|
|
18
|
+
[StringDataMember(code = GNParameterCode.CharacterId)]
|
|
19
|
+
public string characterId;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
/// A list of player groups associated with the character.
|
|
23
|
+
/// </summary>
|
|
24
|
+
[GNArrayDataMember(code = GNParameterCode.PlayerGroups, elementCls = typeof(GenericModels.GroupItem))]
|
|
25
|
+
public List<GenericModels.GroupItem> playerGroups;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// Handles the "OnCharacterPlayerGroupUpdate" event.
|
|
30
|
+
/// </summary>
|
|
31
|
+
public class OnCharacterPlayerGroupUpdateEventHandler : IServerEventHandler
|
|
32
|
+
{
|
|
33
|
+
/// <summary>
|
|
34
|
+
/// Event triggered when a character's player group list is updated.
|
|
35
|
+
/// </summary>
|
|
36
|
+
public static Action<CharacterPlayerGroupUpdate> onUpdate;
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Gets the event code associated with this handler.
|
|
40
|
+
/// </summary>
|
|
41
|
+
/// <returns>The event code for "OnCharacterPlayerGroupUpdate".</returns>
|
|
42
|
+
public int getEventCode() => EventCode.OnCharacterPlayerGroupUpdate;
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
/// Handles the "OnCharacterPlayerGroupUpdate" operation event.
|
|
46
|
+
/// Deserializes the event parameters and invokes the update action.
|
|
47
|
+
/// </summary>
|
|
48
|
+
/// <param name="operationEvent">The operation event containing the parameters for the group update.</param>
|
|
49
|
+
public void handle(OperationEvent operationEvent)
|
|
50
|
+
{
|
|
51
|
+
OnCharacterPlayerGroupUpdateEventHandler.onUpdate?.Invoke(ConverterService.deserializeObject<CharacterPlayerGroupUpdate>(operationEvent.getParameters()));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 0b0be672ac1c10844a4c2fcbfb2b5084
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 0b0be672ac1c10844a4c2fcbfb2b5084
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|