com.taptap.sdk.core 4.3.0-aplha.5
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/BuildTargetUtils.cs +14 -0
- package/Editor/BuildTargetUtils.cs.meta +11 -0
- package/Editor/LinkXMLGenerator.cs +70 -0
- package/Editor/LinkXMLGenerator.cs.meta +11 -0
- package/Editor/Plist.cs +954 -0
- package/Editor/Plist.cs.meta +3 -0
- package/Editor/SDKLinkProcessBuild.cs +119 -0
- package/Editor/SDKLinkProcessBuild.cs.meta +11 -0
- package/Editor/TapFileHelper.cs +168 -0
- package/Editor/TapFileHelper.cs.meta +3 -0
- package/Editor/TapSDK.Core.Editor.asmdef +15 -0
- package/Editor/TapSDK.Core.Editor.asmdef.meta +7 -0
- package/Editor/TapSDKCoreCompile.cs +284 -0
- package/Editor/TapSDKCoreCompile.cs.meta +3 -0
- package/Editor/TapSDKCoreIOSProcessor.cs +74 -0
- package/Editor/TapSDKCoreIOSProcessor.cs.meta +3 -0
- package/Editor/UI/ScrollViewEditor.cs +267 -0
- package/Editor/UI/ScrollViewEditor.cs.meta +12 -0
- package/Editor/UI/ScrollViewExEditor.cs +34 -0
- package/Editor/UI/ScrollViewExEditor.cs.meta +12 -0
- package/Editor/UI/TapSDK.UI.Editor.asmdef +17 -0
- package/Editor/UI/TapSDK.UI.Editor.asmdef.meta +7 -0
- package/Editor/UI.meta +9 -0
- package/Editor.meta +8 -0
- package/Mobile/Editor/NativeDependencies.xml +22 -0
- package/Mobile/Editor/NativeDependencies.xml.meta +7 -0
- package/Mobile/Editor/TapCommonMobileProcessBuild.cs +20 -0
- package/Mobile/Editor/TapCommonMobileProcessBuild.cs.meta +11 -0
- package/Mobile/Editor/TapSDK.Core.Mobile.Editor.asmdef +17 -0
- package/Mobile/Editor/TapSDK.Core.Mobile.Editor.asmdef.meta +7 -0
- package/Mobile/Editor.meta +8 -0
- package/Mobile/Runtime/AndroidNativeWrapper.cs +50 -0
- package/Mobile/Runtime/AndroidNativeWrapper.cs.meta +11 -0
- package/Mobile/Runtime/Bridge.cs +84 -0
- package/Mobile/Runtime/Bridge.cs.meta +11 -0
- package/Mobile/Runtime/BridgeAndroid.cs +73 -0
- package/Mobile/Runtime/BridgeAndroid.cs.meta +11 -0
- package/Mobile/Runtime/BridgeCallback.cs +35 -0
- package/Mobile/Runtime/BridgeCallback.cs.meta +11 -0
- package/Mobile/Runtime/BridgeIOS.cs +113 -0
- package/Mobile/Runtime/BridgeIOS.cs.meta +11 -0
- package/Mobile/Runtime/Command.cs +119 -0
- package/Mobile/Runtime/Command.cs.meta +11 -0
- package/Mobile/Runtime/Constants.cs +9 -0
- package/Mobile/Runtime/Constants.cs.meta +11 -0
- package/Mobile/Runtime/EngineBridgeInitializer.cs +33 -0
- package/Mobile/Runtime/EngineBridgeInitializer.cs.meta +11 -0
- package/Mobile/Runtime/IBridge.cs +15 -0
- package/Mobile/Runtime/IBridge.cs.meta +11 -0
- package/Mobile/Runtime/IOSNativeWrapper.cs +273 -0
- package/Mobile/Runtime/IOSNativeWrapper.cs.meta +11 -0
- package/Mobile/Runtime/Result.cs +37 -0
- package/Mobile/Runtime/Result.cs.meta +11 -0
- package/Mobile/Runtime/TapCoreMobile.cs +71 -0
- package/Mobile/Runtime/TapCoreMobile.cs.meta +11 -0
- package/Mobile/Runtime/TapEventMobile.cs +265 -0
- package/Mobile/Runtime/TapEventMobile.cs.meta +11 -0
- package/Mobile/Runtime/TapSDK.Core.Mobile.Runtime.asmdef +18 -0
- package/Mobile/Runtime/TapSDK.Core.Mobile.Runtime.asmdef.meta +7 -0
- package/Mobile/Runtime/TapUUID.cs +9 -0
- package/Mobile/Runtime/TapUUID.cs.meta +11 -0
- package/Mobile/Runtime.meta +8 -0
- package/Mobile.meta +8 -0
- package/Plugins/iOS.meta +8 -0
- package/Plugins.meta +8 -0
- package/Resources/Fonts/taptap-sdk-bold.ttf +0 -0
- package/Resources/Fonts/taptap-sdk-bold.ttf.meta +22 -0
- package/Resources/Fonts/taptap-sdk.ttf +0 -0
- package/Resources/Fonts/taptap-sdk.ttf.meta +21 -0
- package/Resources/Fonts.meta +8 -0
- package/Resources/Loading.prefab +260 -0
- package/Resources/Loading.prefab.meta +7 -0
- package/Resources/TapCommonTip.prefab +194 -0
- package/Resources/TapCommonTip.prefab.meta +7 -0
- package/Resources/TapCommonToastBlack.prefab +528 -0
- package/Resources/TapCommonToastBlack.prefab.meta +7 -0
- package/Resources/TapCommonToastWhite.prefab +411 -0
- package/Resources/TapCommonToastWhite.prefab.meta +7 -0
- package/Resources/TapSDKCommonTapIcon-v2.png +0 -0
- package/Resources/TapSDKCommonTapIcon-v2.png.meta +128 -0
- package/Resources/TapSDKCommonTapIcon.png +0 -0
- package/Resources/TapSDKCommonTapIcon.png.meta +128 -0
- package/Resources/TapSDKCommonToastBg.png +0 -0
- package/Resources/TapSDKCommonToastBg.png.meta +128 -0
- package/Resources/TapSDKConstantUIRoot.prefab +100 -0
- package/Resources/TapSDKConstantUIRoot.prefab.meta +7 -0
- package/Resources/TapSDKUIRoot.prefab +100 -0
- package/Resources/TapSDKUIRoot.prefab.meta +7 -0
- package/Resources/TapTapBtn_White.png +0 -0
- package/Resources/TapTapBtn_White.png.meta +128 -0
- package/Resources/TapTapBtn_White_2.png +0 -0
- package/Resources/TapTapBtn_White_2.png.meta +128 -0
- package/Resources/ToastBackground.png +0 -0
- package/Resources/ToastBackground.png.meta +128 -0
- package/Resources/detail_bg.png +0 -0
- package/Resources/detail_bg.png.meta +92 -0
- package/Resources/success.png +0 -0
- package/Resources/success.png.meta +128 -0
- package/Resources/taptap-bg.png +0 -0
- package/Resources/taptap-bg.png.meta +140 -0
- package/Resources/taptap-close.png +0 -0
- package/Resources/taptap-close.png.meta +146 -0
- package/Resources/taptap-router-v2.png +0 -0
- package/Resources/taptap-router-v2.png.meta +128 -0
- package/Resources/taptap-router.png +0 -0
- package/Resources/taptap-router.png.meta +146 -0
- package/Resources/taptap-sdk-refresh 1.png +0 -0
- package/Resources/taptap-sdk-refresh 1.png.meta +128 -0
- package/Resources/taptap-toast-error.png +0 -0
- package/Resources/taptap-toast-error.png.meta +128 -0
- package/Resources/taptap-toast-info.png +0 -0
- package/Resources/taptap-toast-info.png.meta +128 -0
- package/Resources/taptap-toast-success.png +0 -0
- package/Resources/taptap-toast-success.png.meta +128 -0
- package/Resources/taptap-toast-warning.png +0 -0
- package/Resources/taptap-toast-warning.png.meta +128 -0
- package/Resources.meta +8 -0
- package/Runtime/Internal/Http/TapHttpClient.cs +176 -0
- package/Runtime/Internal/Http/TapHttpClient.cs.meta +11 -0
- package/Runtime/Internal/Http/TapHttpUtils.cs +83 -0
- package/Runtime/Internal/Http/TapHttpUtils.cs.meta +11 -0
- package/Runtime/Internal/Http.meta +8 -0
- package/Runtime/Internal/Init/IInitTask.cs +18 -0
- package/Runtime/Internal/Init/IInitTask.cs.meta +11 -0
- package/Runtime/Internal/Init.meta +8 -0
- package/Runtime/Internal/Json/TapJsonConverter.cs +40 -0
- package/Runtime/Internal/Json/TapJsonConverter.cs.meta +11 -0
- package/Runtime/Internal/Json.meta +8 -0
- package/Runtime/Internal/Platform/ITapCorePlatform.cs +12 -0
- package/Runtime/Internal/Platform/ITapCorePlatform.cs.meta +11 -0
- package/Runtime/Internal/Platform/ITapEventPlatform.cs +37 -0
- package/Runtime/Internal/Platform/ITapEventPlatform.cs.meta +11 -0
- package/Runtime/Internal/Platform/PlatformTypeUtils.cs +46 -0
- package/Runtime/Internal/Platform/PlatformTypeUtils.cs.meta +11 -0
- package/Runtime/Internal/Platform.meta +8 -0
- package/Runtime/Internal/UI/Base/Const.cs +27 -0
- package/Runtime/Internal/UI/Base/Const.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/GraphicRaycasterBugFixed.cs +240 -0
- package/Runtime/Internal/UI/Base/GraphicRaycasterBugFixed.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/LoadingPanelController.cs +29 -0
- package/Runtime/Internal/UI/Base/LoadingPanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/MonoSingleton.cs +102 -0
- package/Runtime/Internal/UI/Base/MonoSingleton.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/Singleton.cs +29 -0
- package/Runtime/Internal/UI/Base/Singleton.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/TipPanelController.cs +45 -0
- package/Runtime/Internal/UI/Base/TipPanelController.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/ToastBlackPanelController.cs +95 -0
- package/Runtime/Internal/UI/Base/ToastBlackPanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/ToastWhitePanelController.cs +79 -0
- package/Runtime/Internal/UI/Base/ToastWhitePanelController.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/UIManager.cs +724 -0
- package/Runtime/Internal/UI/Base/UIManager.cs.meta +11 -0
- package/Runtime/Internal/UI/Base.meta +8 -0
- package/Runtime/Internal/UI/BasePanel/BasePanelController.cs +385 -0
- package/Runtime/Internal/UI/BasePanel/BasePanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/BasePanel.meta +8 -0
- package/Runtime/Internal/UI/Params/BasePanelConfig.cs +18 -0
- package/Runtime/Internal/UI/Params/BasePanelConfig.cs.meta +11 -0
- package/Runtime/Internal/UI/Params/IOpenPanelParameter.cs +7 -0
- package/Runtime/Internal/UI/Params/IOpenPanelParameter.cs.meta +11 -0
- package/Runtime/Internal/UI/Params.meta +8 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool/SimpleObjPool.cs +76 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool/SimpleObjPool.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool.meta +9 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollView.cs +828 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollView.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollViewEx.cs +245 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollViewEx.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView.meta +9 -0
- package/Runtime/Internal/UI/ScrollViewEx.meta +8 -0
- package/Runtime/Internal/UI.meta +8 -0
- package/Runtime/Internal/Utils/BridgeUtils.cs +29 -0
- package/Runtime/Internal/Utils/BridgeUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils/ImageUtils.cs +147 -0
- package/Runtime/Internal/Utils/ImageUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils/TapLoom.cs +155 -0
- package/Runtime/Internal/Utils/TapLoom.cs.meta +11 -0
- package/Runtime/Internal/Utils/UrlUtils.cs +34 -0
- package/Runtime/Internal/Utils/UrlUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils.meta +8 -0
- package/Runtime/Internal.meta +8 -0
- package/Runtime/Public/DataStorage.cs +141 -0
- package/Runtime/Public/DataStorage.cs.meta +11 -0
- package/Runtime/Public/ITapPropertiesProxy.cs +6 -0
- package/Runtime/Public/ITapPropertiesProxy.cs.meta +11 -0
- package/Runtime/Public/Json.cs +636 -0
- package/Runtime/Public/Json.cs.meta +11 -0
- package/Runtime/Public/Log/TapLogLevel.cs +7 -0
- package/Runtime/Public/Log/TapLogLevel.cs.meta +11 -0
- package/Runtime/Public/Log/TapLogger.cs +48 -0
- package/Runtime/Public/Log/TapLogger.cs.meta +11 -0
- package/Runtime/Public/Log.meta +8 -0
- package/Runtime/Public/Platform.cs +27 -0
- package/Runtime/Public/Platform.cs.meta +11 -0
- package/Runtime/Public/RegionType.cs +8 -0
- package/Runtime/Public/RegionType.cs.meta +11 -0
- package/Runtime/Public/SafeDictionary.cs +27 -0
- package/Runtime/Public/SafeDictionary.cs.meta +11 -0
- package/Runtime/Public/TapError.cs +62 -0
- package/Runtime/Public/TapError.cs.meta +11 -0
- package/Runtime/Public/TapErrorCode.cs +44 -0
- package/Runtime/Public/TapErrorCode.cs.meta +11 -0
- package/Runtime/Public/TapException.cs +24 -0
- package/Runtime/Public/TapException.cs.meta +11 -0
- package/Runtime/Public/TapLanguage.cs +21 -0
- package/Runtime/Public/TapLanguage.cs.meta +11 -0
- package/Runtime/Public/TapLocalizeManager.cs +128 -0
- package/Runtime/Public/TapLocalizeManager.cs.meta +11 -0
- package/Runtime/Public/TapTapEvent.cs +93 -0
- package/Runtime/Public/TapTapEvent.cs.meta +11 -0
- package/Runtime/Public/TapTapSDK.cs +96 -0
- package/Runtime/Public/TapTapSDK.cs.meta +11 -0
- package/Runtime/Public/TapTapSDKCoreOptions.cs +104 -0
- package/Runtime/Public/TapTapSDKCoreOptions.cs.meta +11 -0
- package/Runtime/Public.meta +8 -0
- package/Runtime/TapSDK.Core.Runtime.asmdef +3 -0
- package/Runtime/TapSDK.Core.Runtime.asmdef.meta +7 -0
- package/Runtime.meta +8 -0
- package/Standalone/Editor/TapCoreStandaloneProcessBuild.cs +20 -0
- package/Standalone/Editor/TapCoreStandaloneProcessBuild.cs.meta +11 -0
- package/Standalone/Editor/TapSDK.Core.Standalone.Editor.asmdef +17 -0
- package/Standalone/Editor/TapSDK.Core.Standalone.Editor.asmdef.meta +7 -0
- package/Standalone/Editor.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/Info.plist +46 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/Info.plist.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS/TapDBDeviceInfo +0 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS/TapDBDeviceInfo.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature/CodeResources +115 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature/CodeResources.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle.meta +33 -0
- package/Standalone/Plugins/macOS.meta +8 -0
- package/Standalone/Plugins.meta +8 -0
- package/Standalone/Runtime/Internal/Constants.cs +37 -0
- package/Standalone/Runtime/Internal/Constants.cs.meta +11 -0
- package/Standalone/Runtime/Internal/DeviceInfo.cs +152 -0
- package/Standalone/Runtime/Internal/DeviceInfo.cs.meta +11 -0
- package/Standalone/Runtime/Internal/EventSender.cs +239 -0
- package/Standalone/Runtime/Internal/EventSender.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/HttpClient.cs +211 -0
- package/Standalone/Runtime/Internal/Http/HttpClient.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/NetUtils.cs +48 -0
- package/Standalone/Runtime/Internal/Http/NetUtils.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/TimeUtil.cs +30 -0
- package/Standalone/Runtime/Internal/Http/TimeUtil.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http.meta +8 -0
- package/Standalone/Runtime/Internal/Identity.cs +43 -0
- package/Standalone/Runtime/Internal/Identity.cs.meta +11 -0
- package/Standalone/Runtime/Internal/PlayRecorder.cs +53 -0
- package/Standalone/Runtime/Internal/PlayRecorder.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Prefs.cs +85 -0
- package/Standalone/Runtime/Internal/Prefs.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Tracker.cs +318 -0
- package/Standalone/Runtime/Internal/Tracker.cs.meta +11 -0
- package/Standalone/Runtime/Internal/User.cs +51 -0
- package/Standalone/Runtime/Internal/User.cs.meta +11 -0
- package/Standalone/Runtime/Internal.meta +8 -0
- package/Standalone/Runtime/Public/EventManager.cs +41 -0
- package/Standalone/Runtime/Public/EventManager.cs.meta +11 -0
- package/Standalone/Runtime/Public/TapCoreStandalone.cs +197 -0
- package/Standalone/Runtime/Public/TapCoreStandalone.cs.meta +11 -0
- package/Standalone/Runtime/Public/TapEventStandalone.cs +281 -0
- package/Standalone/Runtime/Public/TapEventStandalone.cs.meta +11 -0
- package/Standalone/Runtime/Public.meta +8 -0
- package/Standalone/Runtime/TapSDK.Core.Standalone.Runtime.asmdef +21 -0
- package/Standalone/Runtime/TapSDK.Core.Standalone.Runtime.asmdef.meta +7 -0
- package/Standalone/Runtime.meta +8 -0
- package/Standalone.meta +8 -0
- package/package.json +8 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2d5e20c49ced14858807cec65b2e9a84
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 11
|
|
7
|
+
mipmaps:
|
|
8
|
+
mipMapMode: 0
|
|
9
|
+
enableMipMap: 0
|
|
10
|
+
sRGBTexture: 1
|
|
11
|
+
linearTexture: 0
|
|
12
|
+
fadeOut: 0
|
|
13
|
+
borderMipMap: 0
|
|
14
|
+
mipMapsPreserveCoverage: 0
|
|
15
|
+
alphaTestReferenceValue: 0.5
|
|
16
|
+
mipMapFadeDistanceStart: 1
|
|
17
|
+
mipMapFadeDistanceEnd: 3
|
|
18
|
+
bumpmap:
|
|
19
|
+
convertToNormalMap: 0
|
|
20
|
+
externalNormalMap: 0
|
|
21
|
+
heightScale: 0.25
|
|
22
|
+
normalMapFilter: 0
|
|
23
|
+
isReadable: 0
|
|
24
|
+
streamingMipmaps: 0
|
|
25
|
+
streamingMipmapsPriority: 0
|
|
26
|
+
grayScaleToAlpha: 0
|
|
27
|
+
generateCubemap: 6
|
|
28
|
+
cubemapConvolution: 0
|
|
29
|
+
seamlessCubemap: 0
|
|
30
|
+
textureFormat: 1
|
|
31
|
+
maxTextureSize: 2048
|
|
32
|
+
textureSettings:
|
|
33
|
+
serializedVersion: 2
|
|
34
|
+
filterMode: 1
|
|
35
|
+
aniso: 1
|
|
36
|
+
mipBias: 0
|
|
37
|
+
wrapU: 1
|
|
38
|
+
wrapV: 1
|
|
39
|
+
wrapW: 0
|
|
40
|
+
nPOTScale: 0
|
|
41
|
+
lightmap: 0
|
|
42
|
+
compressionQuality: 50
|
|
43
|
+
spriteMode: 1
|
|
44
|
+
spriteExtrude: 1
|
|
45
|
+
spriteMeshType: 1
|
|
46
|
+
alignment: 0
|
|
47
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
48
|
+
spritePixelsToUnits: 100
|
|
49
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
50
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
51
|
+
alphaUsage: 1
|
|
52
|
+
alphaIsTransparency: 1
|
|
53
|
+
spriteTessellationDetail: -1
|
|
54
|
+
textureType: 8
|
|
55
|
+
textureShape: 1
|
|
56
|
+
singleChannelComponent: 0
|
|
57
|
+
maxTextureSizeSet: 0
|
|
58
|
+
compressionQualitySet: 0
|
|
59
|
+
textureFormatSet: 0
|
|
60
|
+
applyGammaDecoding: 0
|
|
61
|
+
platformSettings:
|
|
62
|
+
- serializedVersion: 3
|
|
63
|
+
buildTarget: DefaultTexturePlatform
|
|
64
|
+
maxTextureSize: 2048
|
|
65
|
+
resizeAlgorithm: 0
|
|
66
|
+
textureFormat: -1
|
|
67
|
+
textureCompression: 1
|
|
68
|
+
compressionQuality: 50
|
|
69
|
+
crunchedCompression: 0
|
|
70
|
+
allowsAlphaSplitting: 0
|
|
71
|
+
overridden: 0
|
|
72
|
+
androidETC2FallbackOverride: 0
|
|
73
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
74
|
+
- serializedVersion: 3
|
|
75
|
+
buildTarget: Standalone
|
|
76
|
+
maxTextureSize: 2048
|
|
77
|
+
resizeAlgorithm: 0
|
|
78
|
+
textureFormat: -1
|
|
79
|
+
textureCompression: 1
|
|
80
|
+
compressionQuality: 50
|
|
81
|
+
crunchedCompression: 0
|
|
82
|
+
allowsAlphaSplitting: 0
|
|
83
|
+
overridden: 0
|
|
84
|
+
androidETC2FallbackOverride: 0
|
|
85
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
86
|
+
- serializedVersion: 3
|
|
87
|
+
buildTarget: iPhone
|
|
88
|
+
maxTextureSize: 2048
|
|
89
|
+
resizeAlgorithm: 0
|
|
90
|
+
textureFormat: -1
|
|
91
|
+
textureCompression: 1
|
|
92
|
+
compressionQuality: 50
|
|
93
|
+
crunchedCompression: 0
|
|
94
|
+
allowsAlphaSplitting: 0
|
|
95
|
+
overridden: 0
|
|
96
|
+
androidETC2FallbackOverride: 0
|
|
97
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
98
|
+
- serializedVersion: 3
|
|
99
|
+
buildTarget: Android
|
|
100
|
+
maxTextureSize: 2048
|
|
101
|
+
resizeAlgorithm: 0
|
|
102
|
+
textureFormat: -1
|
|
103
|
+
textureCompression: 1
|
|
104
|
+
compressionQuality: 50
|
|
105
|
+
crunchedCompression: 0
|
|
106
|
+
allowsAlphaSplitting: 0
|
|
107
|
+
overridden: 0
|
|
108
|
+
androidETC2FallbackOverride: 0
|
|
109
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
110
|
+
spriteSheet:
|
|
111
|
+
serializedVersion: 2
|
|
112
|
+
sprites: []
|
|
113
|
+
outline: []
|
|
114
|
+
physicsShape: []
|
|
115
|
+
bones: []
|
|
116
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
117
|
+
internalID: 0
|
|
118
|
+
vertices: []
|
|
119
|
+
indices:
|
|
120
|
+
edges: []
|
|
121
|
+
weights: []
|
|
122
|
+
secondaryTextures: []
|
|
123
|
+
spritePackingTag:
|
|
124
|
+
pSDRemoveMatte: 0
|
|
125
|
+
pSDShowRemoveMatteOption: 0
|
|
126
|
+
userData:
|
|
127
|
+
assetBundleName:
|
|
128
|
+
assetBundleVariant:
|
|
Binary file
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 5efa9271d97444048939c99c03e360b6
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 11
|
|
7
|
+
mipmaps:
|
|
8
|
+
mipMapMode: 0
|
|
9
|
+
enableMipMap: 0
|
|
10
|
+
sRGBTexture: 1
|
|
11
|
+
linearTexture: 0
|
|
12
|
+
fadeOut: 0
|
|
13
|
+
borderMipMap: 0
|
|
14
|
+
mipMapsPreserveCoverage: 0
|
|
15
|
+
alphaTestReferenceValue: 0.5
|
|
16
|
+
mipMapFadeDistanceStart: 1
|
|
17
|
+
mipMapFadeDistanceEnd: 3
|
|
18
|
+
bumpmap:
|
|
19
|
+
convertToNormalMap: 0
|
|
20
|
+
externalNormalMap: 0
|
|
21
|
+
heightScale: 0.25
|
|
22
|
+
normalMapFilter: 0
|
|
23
|
+
isReadable: 0
|
|
24
|
+
streamingMipmaps: 0
|
|
25
|
+
streamingMipmapsPriority: 0
|
|
26
|
+
grayScaleToAlpha: 0
|
|
27
|
+
generateCubemap: 6
|
|
28
|
+
cubemapConvolution: 0
|
|
29
|
+
seamlessCubemap: 0
|
|
30
|
+
textureFormat: 1
|
|
31
|
+
maxTextureSize: 2048
|
|
32
|
+
textureSettings:
|
|
33
|
+
serializedVersion: 2
|
|
34
|
+
filterMode: 1
|
|
35
|
+
aniso: 1
|
|
36
|
+
mipBias: 0
|
|
37
|
+
wrapU: 1
|
|
38
|
+
wrapV: 1
|
|
39
|
+
wrapW: 0
|
|
40
|
+
nPOTScale: 0
|
|
41
|
+
lightmap: 0
|
|
42
|
+
compressionQuality: 50
|
|
43
|
+
spriteMode: 1
|
|
44
|
+
spriteExtrude: 1
|
|
45
|
+
spriteMeshType: 1
|
|
46
|
+
alignment: 0
|
|
47
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
48
|
+
spritePixelsToUnits: 100
|
|
49
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
50
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
51
|
+
alphaUsage: 1
|
|
52
|
+
alphaIsTransparency: 1
|
|
53
|
+
spriteTessellationDetail: -1
|
|
54
|
+
textureType: 8
|
|
55
|
+
textureShape: 1
|
|
56
|
+
singleChannelComponent: 0
|
|
57
|
+
maxTextureSizeSet: 0
|
|
58
|
+
compressionQualitySet: 0
|
|
59
|
+
textureFormatSet: 0
|
|
60
|
+
applyGammaDecoding: 0
|
|
61
|
+
platformSettings:
|
|
62
|
+
- serializedVersion: 3
|
|
63
|
+
buildTarget: DefaultTexturePlatform
|
|
64
|
+
maxTextureSize: 2048
|
|
65
|
+
resizeAlgorithm: 0
|
|
66
|
+
textureFormat: -1
|
|
67
|
+
textureCompression: 1
|
|
68
|
+
compressionQuality: 50
|
|
69
|
+
crunchedCompression: 0
|
|
70
|
+
allowsAlphaSplitting: 0
|
|
71
|
+
overridden: 0
|
|
72
|
+
androidETC2FallbackOverride: 0
|
|
73
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
74
|
+
- serializedVersion: 3
|
|
75
|
+
buildTarget: Standalone
|
|
76
|
+
maxTextureSize: 2048
|
|
77
|
+
resizeAlgorithm: 0
|
|
78
|
+
textureFormat: -1
|
|
79
|
+
textureCompression: 1
|
|
80
|
+
compressionQuality: 50
|
|
81
|
+
crunchedCompression: 0
|
|
82
|
+
allowsAlphaSplitting: 0
|
|
83
|
+
overridden: 0
|
|
84
|
+
androidETC2FallbackOverride: 0
|
|
85
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
86
|
+
- serializedVersion: 3
|
|
87
|
+
buildTarget: iPhone
|
|
88
|
+
maxTextureSize: 2048
|
|
89
|
+
resizeAlgorithm: 0
|
|
90
|
+
textureFormat: -1
|
|
91
|
+
textureCompression: 1
|
|
92
|
+
compressionQuality: 50
|
|
93
|
+
crunchedCompression: 0
|
|
94
|
+
allowsAlphaSplitting: 0
|
|
95
|
+
overridden: 0
|
|
96
|
+
androidETC2FallbackOverride: 0
|
|
97
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
98
|
+
- serializedVersion: 3
|
|
99
|
+
buildTarget: Android
|
|
100
|
+
maxTextureSize: 2048
|
|
101
|
+
resizeAlgorithm: 0
|
|
102
|
+
textureFormat: -1
|
|
103
|
+
textureCompression: 1
|
|
104
|
+
compressionQuality: 50
|
|
105
|
+
crunchedCompression: 0
|
|
106
|
+
allowsAlphaSplitting: 0
|
|
107
|
+
overridden: 0
|
|
108
|
+
androidETC2FallbackOverride: 0
|
|
109
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
110
|
+
spriteSheet:
|
|
111
|
+
serializedVersion: 2
|
|
112
|
+
sprites: []
|
|
113
|
+
outline: []
|
|
114
|
+
physicsShape: []
|
|
115
|
+
bones: []
|
|
116
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
117
|
+
internalID: 0
|
|
118
|
+
vertices: []
|
|
119
|
+
indices:
|
|
120
|
+
edges: []
|
|
121
|
+
weights: []
|
|
122
|
+
secondaryTextures: []
|
|
123
|
+
spritePackingTag:
|
|
124
|
+
pSDRemoveMatte: 0
|
|
125
|
+
pSDShowRemoveMatteOption: 0
|
|
126
|
+
userData:
|
|
127
|
+
assetBundleName:
|
|
128
|
+
assetBundleVariant:
|
package/Resources.meta
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Linq;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using System.Threading.Tasks;
|
|
5
|
+
using System.Net;
|
|
6
|
+
using System.Net.Http;
|
|
7
|
+
using System.Net.Http.Headers;
|
|
8
|
+
using System.Text;
|
|
9
|
+
using Newtonsoft.Json;
|
|
10
|
+
using TapSDK.Core.Internal.Json;
|
|
11
|
+
|
|
12
|
+
namespace TapSDK.Core.Internal.Http {
|
|
13
|
+
public class TapHttpClient {
|
|
14
|
+
private readonly string clientId;
|
|
15
|
+
|
|
16
|
+
private readonly string clientToken;
|
|
17
|
+
|
|
18
|
+
private readonly string serverUrl;
|
|
19
|
+
|
|
20
|
+
readonly HttpClient client;
|
|
21
|
+
|
|
22
|
+
private Dictionary<string, Func<Task<string>>> runtimeHeaderTasks = new Dictionary<string, Func<Task<string>>>();
|
|
23
|
+
|
|
24
|
+
private Dictionary<string, string> additionalHeaders = new Dictionary<string, string>();
|
|
25
|
+
|
|
26
|
+
public TapHttpClient(string clientID, string clientToken, string serverUrl) {
|
|
27
|
+
this.clientId = clientID;
|
|
28
|
+
this.clientToken = clientToken;
|
|
29
|
+
this.serverUrl = serverUrl;
|
|
30
|
+
|
|
31
|
+
client = new HttpClient();
|
|
32
|
+
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
|
33
|
+
client.DefaultRequestHeaders.Add("X-LC-Id", clientID);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public void AddRuntimeHeaderTask(string key, Func<Task<string>> task) {
|
|
37
|
+
if (string.IsNullOrEmpty(key)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (task == null) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
runtimeHeaderTasks[key] = task;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public void AddAddtionalHeader(string key, string value) {
|
|
47
|
+
if (string.IsNullOrEmpty(key)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (string.IsNullOrEmpty(value)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
additionalHeaders[key] = value;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public Task<T> Get<T>(string path,
|
|
57
|
+
Dictionary<string, object> headers = null,
|
|
58
|
+
Dictionary<string, object> queryParams = null,
|
|
59
|
+
bool withAPIVersion = true) {
|
|
60
|
+
return Request<T>(path, HttpMethod.Get, headers, null, queryParams, withAPIVersion);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public Task<T> Post<T>(string path,
|
|
64
|
+
Dictionary<string, object> headers = null,
|
|
65
|
+
object data = null,
|
|
66
|
+
Dictionary<string, object> queryParams = null,
|
|
67
|
+
bool withAPIVersion = true) {
|
|
68
|
+
return Request<T>(path, HttpMethod.Post, headers, data, queryParams, withAPIVersion);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public Task<T> Put<T>(string path,
|
|
72
|
+
Dictionary<string, object> headers = null,
|
|
73
|
+
object data = null,
|
|
74
|
+
Dictionary<string, object> queryParams = null,
|
|
75
|
+
bool withAPIVersion = true) {
|
|
76
|
+
return Request<T>(path, HttpMethod.Put, headers, data, queryParams, withAPIVersion);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public Task Delete(string path,
|
|
80
|
+
Dictionary<string, object> headers = null,
|
|
81
|
+
object data = null,
|
|
82
|
+
Dictionary<string, object> queryParams = null,
|
|
83
|
+
bool withAPIVersion = true) {
|
|
84
|
+
return Request<Dictionary<string, object>>(path, HttpMethod.Delete, headers, data, queryParams, withAPIVersion);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async Task<T> Request<T>(string path,
|
|
88
|
+
HttpMethod method,
|
|
89
|
+
Dictionary<string, object> headers = null,
|
|
90
|
+
object data = null,
|
|
91
|
+
Dictionary<string, object> queryParams = null,
|
|
92
|
+
bool withAPIVersion = true) {
|
|
93
|
+
string url = BuildUrl(path, queryParams);
|
|
94
|
+
HttpRequestMessage request = new HttpRequestMessage {
|
|
95
|
+
RequestUri = new Uri(url),
|
|
96
|
+
Method = method,
|
|
97
|
+
};
|
|
98
|
+
await FillHeaders(request.Headers, headers);
|
|
99
|
+
|
|
100
|
+
string content = null;
|
|
101
|
+
if (data != null) {
|
|
102
|
+
content = JsonConvert.SerializeObject(data);
|
|
103
|
+
StringContent requestContent = new StringContent(content);
|
|
104
|
+
requestContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
|
105
|
+
request.Content = requestContent;
|
|
106
|
+
}
|
|
107
|
+
TapHttpUtils.PrintRequest(client, request, content);
|
|
108
|
+
HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
|
|
109
|
+
request.Dispose();
|
|
110
|
+
|
|
111
|
+
string resultString = await response.Content.ReadAsStringAsync();
|
|
112
|
+
response.Dispose();
|
|
113
|
+
TapHttpUtils.PrintResponse(response, resultString);
|
|
114
|
+
|
|
115
|
+
if (response.IsSuccessStatusCode) {
|
|
116
|
+
T ret = JsonConvert.DeserializeObject<T>(resultString,
|
|
117
|
+
TapJsonConverter.Default);
|
|
118
|
+
return ret;
|
|
119
|
+
}
|
|
120
|
+
throw HandleErrorResponse(response.StatusCode, resultString);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
TapException HandleErrorResponse(HttpStatusCode statusCode, string responseContent) {
|
|
124
|
+
int code = (int)statusCode;
|
|
125
|
+
string message = responseContent;
|
|
126
|
+
try {
|
|
127
|
+
// 尝试获取 LeanCloud 返回错误信息
|
|
128
|
+
Dictionary<string, object> error = JsonConvert.DeserializeObject<Dictionary<string, object>>(responseContent,
|
|
129
|
+
TapJsonConverter.Default);
|
|
130
|
+
code = (int)error["code"];
|
|
131
|
+
message = error["error"].ToString();
|
|
132
|
+
} catch (Exception e) {
|
|
133
|
+
TapLogger.Error(e);
|
|
134
|
+
}
|
|
135
|
+
return new TapException(code, message);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
string BuildUrl(string path, Dictionary<string, object> queryParams) {
|
|
139
|
+
string apiServer = serverUrl;
|
|
140
|
+
StringBuilder urlSB = new StringBuilder(apiServer.TrimEnd('/'));
|
|
141
|
+
urlSB.Append($"/{path}");
|
|
142
|
+
string url = urlSB.ToString();
|
|
143
|
+
if (queryParams != null) {
|
|
144
|
+
IEnumerable<string> queryPairs = queryParams.Select(kv => $"{kv.Key}={kv.Value}");
|
|
145
|
+
string queries = string.Join("&", queryPairs);
|
|
146
|
+
url = $"{url}?{queries}";
|
|
147
|
+
}
|
|
148
|
+
return url;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async Task FillHeaders(HttpRequestHeaders headers, Dictionary<string, object> reqHeaders = null) {
|
|
152
|
+
// 额外 headers
|
|
153
|
+
if (reqHeaders != null) {
|
|
154
|
+
foreach (KeyValuePair<string, object> kv in reqHeaders) {
|
|
155
|
+
headers.Add(kv.Key, kv.Value.ToString());
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (additionalHeaders.Count > 0) {
|
|
159
|
+
foreach (KeyValuePair<string, string> kv in additionalHeaders) {
|
|
160
|
+
headers.Add(kv.Key, kv.Value);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// 服务额外 headers
|
|
164
|
+
foreach (KeyValuePair<string, Func<Task<string>>> kv in runtimeHeaderTasks) {
|
|
165
|
+
if (headers.Contains(kv.Key)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
string value = await kv.Value.Invoke();
|
|
169
|
+
if (value == null) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
headers.Add(kv.Key, value);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
using System.Linq;
|
|
2
|
+
using System.Text;
|
|
3
|
+
using System.Collections.Specialized;
|
|
4
|
+
using System.Net.Http;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace TapSDK.Core.Internal.Http {
|
|
8
|
+
public class TapHttpUtils {
|
|
9
|
+
public static void PrintRequest(HttpClient client, HttpRequestMessage request, string content = null) {
|
|
10
|
+
if (TapLogger.LogDelegate == null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (client == null) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (request == null) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
StringBuilder sb = new StringBuilder();
|
|
20
|
+
sb.AppendLine("=== HTTP Request Start ===");
|
|
21
|
+
sb.AppendLine($"URL: {request.RequestUri}");
|
|
22
|
+
sb.AppendLine($"Method: {request.Method}");
|
|
23
|
+
sb.AppendLine($"Headers: ");
|
|
24
|
+
foreach (var header in client.DefaultRequestHeaders) {
|
|
25
|
+
sb.AppendLine($"\t{header.Key}: {string.Join(",", header.Value.ToArray())}");
|
|
26
|
+
}
|
|
27
|
+
foreach (var header in request.Headers) {
|
|
28
|
+
sb.AppendLine($"\t{header.Key}: {string.Join(",", header.Value.ToArray())}");
|
|
29
|
+
}
|
|
30
|
+
if (request.Content != null) {
|
|
31
|
+
foreach (var header in request.Content.Headers) {
|
|
32
|
+
sb.AppendLine($"\t{header.Key}: {string.Join(",", header.Value.ToArray())}");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (!string.IsNullOrEmpty(content)) {
|
|
36
|
+
sb.AppendLine($"Content: {content}");
|
|
37
|
+
}
|
|
38
|
+
sb.AppendLine("=== HTTP Request End ===");
|
|
39
|
+
Debug.Log(sb.ToString());
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public static void PrintResponse(HttpResponseMessage response, string content = null) {
|
|
43
|
+
if (TapLogger.LogDelegate == null) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
StringBuilder sb = new StringBuilder();
|
|
47
|
+
sb.AppendLine("=== HTTP Response Start ===");
|
|
48
|
+
sb.AppendLine($"URL: {response.RequestMessage.RequestUri}");
|
|
49
|
+
sb.AppendLine($"Status Code: {response.StatusCode}");
|
|
50
|
+
if (!string.IsNullOrEmpty(content)) {
|
|
51
|
+
sb.AppendLine($"Content: {content}");
|
|
52
|
+
}
|
|
53
|
+
sb.AppendLine("=== HTTP Response End ===");
|
|
54
|
+
Debug.Log(sb.ToString());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static NameValueCollection ParseQueryString(string queryString)
|
|
58
|
+
{
|
|
59
|
+
if (string.IsNullOrEmpty(queryString)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (queryString.Length > 0 && queryString[0] == '?') {
|
|
64
|
+
queryString = queryString.Substring(1);
|
|
65
|
+
}
|
|
66
|
+
NameValueCollection queryParameters = new NameValueCollection();
|
|
67
|
+
string[] querySegments = queryString.Split('&');
|
|
68
|
+
foreach(string segment in querySegments)
|
|
69
|
+
{
|
|
70
|
+
string[] parts = segment.Split('=');
|
|
71
|
+
if (parts.Length > 0)
|
|
72
|
+
{
|
|
73
|
+
string key = parts[0].Trim(new char[] { '?', ' ' });
|
|
74
|
+
string val = parts[1].Trim();
|
|
75
|
+
|
|
76
|
+
queryParameters.Add(key, val);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return queryParameters;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
namespace TapSDK.Core.Internal.Init {
|
|
3
|
+
public interface IInitTask {
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// 初始化顺序
|
|
6
|
+
/// </summary>
|
|
7
|
+
int Order { get; }
|
|
8
|
+
|
|
9
|
+
/// <summary>
|
|
10
|
+
/// 初始化
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <param name="config"></param>
|
|
13
|
+
void Init(TapTapSDKCoreOptions coreOption, TapTapSDKBaseOption[] otherOptions);
|
|
14
|
+
|
|
15
|
+
void Init(TapTapSDKCoreOptions coreOption);
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using Newtonsoft.Json;
|
|
4
|
+
|
|
5
|
+
namespace TapSDK.Core.Internal.Json {
|
|
6
|
+
public class TapJsonConverter : JsonConverter {
|
|
7
|
+
public override bool CanConvert(Type objectType) {
|
|
8
|
+
return objectType == typeof(object);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) {
|
|
12
|
+
serializer.Serialize(writer, value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) {
|
|
16
|
+
if (reader.TokenType == JsonToken.StartObject) {
|
|
17
|
+
var obj = new Dictionary<string, object>();
|
|
18
|
+
serializer.Populate(reader, obj);
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
21
|
+
if (reader.TokenType == JsonToken.StartArray) {
|
|
22
|
+
var arr = new List<object>();
|
|
23
|
+
serializer.Populate(reader, arr);
|
|
24
|
+
return arr;
|
|
25
|
+
}
|
|
26
|
+
if (reader.TokenType == JsonToken.Integer) {
|
|
27
|
+
if ((long)reader.Value < int.MaxValue) {
|
|
28
|
+
return Convert.ToInt32(reader.Value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (reader.TokenType == JsonToken.Float) {
|
|
32
|
+
return Convert.ToSingle(reader.Value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return serializer.Deserialize(reader);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public readonly static TapJsonConverter Default = new TapJsonConverter();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Threading.Tasks;
|
|
3
|
+
|
|
4
|
+
namespace TapSDK.Core.Internal {
|
|
5
|
+
public interface ITapCorePlatform {
|
|
6
|
+
void Init(TapTapSDKCoreOptions config);
|
|
7
|
+
|
|
8
|
+
void Init(TapTapSDKCoreOptions coreOption, TapTapSDKBaseOption[] otherOptions);
|
|
9
|
+
|
|
10
|
+
void UpdateLanguage(TapTapLanguageType language);
|
|
11
|
+
}
|
|
12
|
+
}
|