test: add test
parent
0728c49ba3
commit
a996b3fcda
|
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 1ccf793b7ca1cc645b9cd36d753b8e3c, type: 3}
|
m_Script: {fileID: 11500000, guid: 1ccf793b7ca1cc645b9cd36d753b8e3c, type: 3}
|
||||||
m_Name: Api Reference
|
m_Name: Api Reference
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
url: https://api.play4promo.online/graphql
|
url: http://192.168.1.126:50050/graphql
|
||||||
queries: []
|
queries: []
|
||||||
mutations:
|
mutations:
|
||||||
- name: LoginAsGameMachine
|
- name: LoginAsGameMachine
|
||||||
|
@ -281,8 +281,8 @@ MonoBehaviour:
|
||||||
- name: SubmitGameSession
|
- name: SubmitGameSession
|
||||||
type: 1
|
type: 1
|
||||||
query: "mutation SubmitGameSession{\n submitGameSession( input :{ playerId
|
query: "mutation SubmitGameSession{\n submitGameSession( input :{ playerId
|
||||||
:\"63e7cde8d9c01000\", promotionId :\"63c67c5434403000\", startAt :\"2024-05-22T14:29:49.1804663+07:00\",
|
:null, promotionId :\"63c67c5434403000\", startAt :\"0001-01-01T00:00:00\",
|
||||||
endAt :\"2024-05-22T14:29:53.1833723+07:00\", score :1000} ){\n startAt\n
|
endAt :\"2024-05-22T18:02:17.589268+07:00\", score :1000} ){\n startAt\n
|
||||||
endAt\n score\n }\n}"
|
endAt\n score\n }\n}"
|
||||||
queryString: submitGameSession
|
queryString: submitGameSession
|
||||||
returnType: GameSession
|
returnType: GameSession
|
||||||
|
@ -392,8 +392,8 @@ MonoBehaviour:
|
||||||
- name: GuestUpdatedSubscription
|
- name: GuestUpdatedSubscription
|
||||||
type: 2
|
type: 2
|
||||||
query: "subscription GuestUpdatedSubscription{\n guestUpdatedSubscription(
|
query: "subscription GuestUpdatedSubscription{\n guestUpdatedSubscription(
|
||||||
guestId :\"63e7cde8d9c01000\" ){\n firstName\n lastName\n
|
guestId :null ){\n firstName\n lastName\n phone\n
|
||||||
phone\n email\n }\n}"
|
email\n }\n}"
|
||||||
queryString: guestUpdatedSubscription
|
queryString: guestUpdatedSubscription
|
||||||
returnType: Guest
|
returnType: Guest
|
||||||
queryOptions:
|
queryOptions:
|
||||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
m_IndirectSpecularColor: {r: 0.37311918, g: 0.3807398, b: 0.35872716, a: 1}
|
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.35872743, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -123,6 +123,140 @@ NavMeshSettings:
|
||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &273960173
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 273960174}
|
||||||
|
- component: {fileID: 273960176}
|
||||||
|
- component: {fileID: 273960175}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text (TMP)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &273960174
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 273960173}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1209049016}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: -534}
|
||||||
|
m_SizeDelta: {x: 1000, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &273960175
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 273960173}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: New Text
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190335
|
||||||
|
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 100
|
||||||
|
m_fontSizeBase: 100
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 2
|
||||||
|
m_VerticalAlignment: 512
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 1
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_baseMaterial: {fileID: 0}
|
||||||
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!222 &273960176
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 273960173}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &398718622
|
--- !u!1 &398718622
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -167,9 +301,200 @@ Transform:
|
||||||
m_LocalPosition: {x: -0.10615547, y: 1.534176, z: 240.78484}
|
m_LocalPosition: {x: -0.10615547, y: 1.534176, z: 240.78484}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1209049016}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &550571513
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 550571516}
|
||||||
|
- component: {fileID: 550571515}
|
||||||
|
- component: {fileID: 550571514}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: RawImage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &550571514
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 550571513}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_UVRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
--- !u!222 &550571515
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 550571513}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!224 &550571516
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 550571513}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1209049016}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 500, y: 500}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &1209049015
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1209049016}
|
||||||
|
- component: {fileID: 1209049019}
|
||||||
|
- component: {fileID: 1209049018}
|
||||||
|
- component: {fileID: 1209049017}
|
||||||
|
- component: {fileID: 1209049020}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Canvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1209049016
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1209049015}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 550571516}
|
||||||
|
- {fileID: 273960174}
|
||||||
|
m_Father: {fileID: 398718624}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!114 &1209049017
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1209049015}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 247
|
||||||
|
--- !u!114 &1209049018
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1209049015}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!223 &1209049019
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1209049015}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_VertexColorAlwaysGammaSpace: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
|
m_UpdateRectTransformForStandalone: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &1209049020
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1209049015}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f2ed12c90e56109a5b65314bee966240, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_rawImage: {fileID: 550571514}
|
||||||
|
_mail: {fileID: 273960175}
|
||||||
--- !u!1 &1721719374
|
--- !u!1 &1721719374
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -2,19 +2,19 @@ using System;
|
||||||
|
|
||||||
namespace GadGame.Network
|
namespace GadGame.Network
|
||||||
{
|
{
|
||||||
struct User
|
public struct User
|
||||||
{
|
{
|
||||||
public string id;
|
public string id;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LoginDetails
|
public struct LoginDetails
|
||||||
{
|
{
|
||||||
public string accessToken;
|
public string accessToken;
|
||||||
public string refreshToken;
|
public string refreshToken;
|
||||||
public User user;
|
public User user;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Participant
|
public struct Participant
|
||||||
{
|
{
|
||||||
public string id;
|
public string id;
|
||||||
public int totalScore;
|
public int totalScore;
|
||||||
|
@ -22,7 +22,7 @@ namespace GadGame.Network
|
||||||
public int myRanke;
|
public int myRanke;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GameSession
|
public struct GameSession
|
||||||
{
|
{
|
||||||
public string id;
|
public string id;
|
||||||
public DateTime startAt;
|
public DateTime startAt;
|
||||||
|
@ -31,7 +31,7 @@ namespace GadGame.Network
|
||||||
public Participant participant;
|
public Participant participant;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Guest
|
public struct Guest
|
||||||
{
|
{
|
||||||
public string id;
|
public string id;
|
||||||
public string firstName;
|
public string firstName;
|
||||||
|
|
|
@ -33,18 +33,7 @@ namespace GadGame.Network
|
||||||
private string _userAccessToken;
|
private string _userAccessToken;
|
||||||
private string _machineAccessToken;
|
private string _machineAccessToken;
|
||||||
|
|
||||||
public Action<OnSubscriptionDataReceived> OnGuestUpdatedSubscription;
|
public Action<Guest> OnGuestUpdatedSubscription;
|
||||||
|
|
||||||
protected override async void Awake()
|
|
||||||
{
|
|
||||||
base.Awake();
|
|
||||||
await LoginMachine();
|
|
||||||
await CreateGuest();
|
|
||||||
await JoinPromotion();
|
|
||||||
await UniTask.Delay(5000);
|
|
||||||
await SubmitGameSession(1000);
|
|
||||||
GetQrLink();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
|
@ -58,8 +47,10 @@ namespace GadGame.Network
|
||||||
|
|
||||||
private void OnGuestUpdated(OnSubscriptionDataReceived dataReceived)
|
private void OnGuestUpdated(OnSubscriptionDataReceived dataReceived)
|
||||||
{
|
{
|
||||||
|
var Jobj = JObject.Parse(dataReceived.data);
|
||||||
Debug.Log(dataReceived.data);
|
Debug.Log(dataReceived.data);
|
||||||
OnGuestUpdatedSubscription?.Invoke(dataReceived);
|
var data = Jobj["payload"]!["data"]!["guestUpdatedSubscription"]!.ToObject<Guest>();
|
||||||
|
OnGuestUpdatedSubscription?.Invoke(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataReceive GetData(string data)
|
private DataReceive GetData(string data)
|
||||||
|
@ -68,7 +59,7 @@ namespace GadGame.Network
|
||||||
return JsonConvert.DeserializeObject<DataReceive>(json);
|
return JsonConvert.DeserializeObject<DataReceive>(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> LoginMachine()
|
public async Task<bool> LoginMachine()
|
||||||
{
|
{
|
||||||
var query = _graphApi.GetQueryByName("LoginAsGameMachine", GraphApi.Query.Type.Mutation);
|
var query = _graphApi.GetQueryByName("LoginAsGameMachine", GraphApi.Query.Type.Mutation);
|
||||||
query.SetArgs(new
|
query.SetArgs(new
|
||||||
|
@ -162,7 +153,7 @@ namespace GadGame.Network
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_graphApi.SetAuthToken(_userAccessToken);
|
_graphApi.SetAuthToken(_machineAccessToken);
|
||||||
var request = await _graphApi.Post(query);
|
var request = await _graphApi.Post(query);
|
||||||
if (request.result == UnityWebRequest.Result.Success)
|
if (request.result == UnityWebRequest.Result.Success)
|
||||||
{
|
{
|
||||||
|
@ -176,9 +167,9 @@ namespace GadGame.Network
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void GetQrLink()
|
public async Task<Texture2D> GetQrLink()
|
||||||
{
|
{
|
||||||
await GuestUpdatedSubscription();
|
return await GuestUpdatedSubscription();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Texture2D> GuestUpdatedSubscription()
|
private async Task<Texture2D> GuestUpdatedSubscription()
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using GadGame.Network;
|
||||||
|
using GraphQlClient.EventCallbacks;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|
||||||
|
public class Test : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
[SerializeField] private RawImage _rawImage;
|
||||||
|
[SerializeField] private TextMeshProUGUI _mail;
|
||||||
|
|
||||||
|
void OnEnable()
|
||||||
|
{
|
||||||
|
P4PGraphqlManager.Instance.OnGuestUpdatedSubscription += ShowInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDisable()
|
||||||
|
{
|
||||||
|
P4PGraphqlManager.Instance.OnGuestUpdatedSubscription -= ShowInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
async void Start()
|
||||||
|
{
|
||||||
|
await P4PGraphqlManager.Instance.LoginMachine();
|
||||||
|
await P4PGraphqlManager.Instance.CreateGuest();
|
||||||
|
await P4PGraphqlManager.Instance.JoinPromotion();
|
||||||
|
await UniTask.Delay(1000);
|
||||||
|
await P4PGraphqlManager.Instance.SubmitGameSession(1000);
|
||||||
|
_rawImage.texture = await P4PGraphqlManager.Instance.GetQrLink();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowInfo(Guest guest) {
|
||||||
|
Debug.Log(guest);
|
||||||
|
_mail.text = guest.email;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f2ed12c90e56109a5b65314bee966240
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 560a88da2bbc70140bed167f0ba7fe37
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fb01be13d6e88ca488dda82150319bfc
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 117dcc671050f5247bd8743b91ecaab7
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -27,7 +27,6 @@ namespace GraphQlClient.Core
|
||||||
disposeUploadHandlerOnDispose = true
|
disposeUploadHandlerOnDispose = true
|
||||||
};
|
};
|
||||||
request.SetRequestHeader("Content-Type", "application/json");
|
request.SetRequestHeader("Content-Type", "application/json");
|
||||||
request.SetRequestHeader("Accept-Encoding", "gzip, deflate");
|
|
||||||
if (!String.IsNullOrEmpty(authToken))
|
if (!String.IsNullOrEmpty(authToken))
|
||||||
request.SetRequestHeader("Authorization", "Bearer " + authToken);
|
request.SetRequestHeader("Authorization", "Bearer " + authToken);
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
"hash": "ec68815a20a955e699fa613ce243cec12f820636"
|
"hash": "ec68815a20a955e699fa613ce243cec12f820636"
|
||||||
},
|
},
|
||||||
"com.unity.2d.animation": {
|
"com.unity.2d.animation": {
|
||||||
"version": "9.0.4",
|
"version": "9.1.0",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.2d.common": "8.0.1",
|
"com.unity.2d.common": "8.0.2",
|
||||||
"com.unity.2d.sprite": "1.0.0",
|
"com.unity.2d.sprite": "1.0.0",
|
||||||
"com.unity.collections": "1.1.0",
|
"com.unity.collections": "1.1.0",
|
||||||
"com.unity.modules.animation": "1.0.0",
|
"com.unity.modules.animation": "1.0.0",
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.2d.aseprite": {
|
"com.unity.2d.aseprite": {
|
||||||
"version": "1.0.1",
|
"version": "1.1.2",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.2d.common": {
|
"com.unity.2d.common": {
|
||||||
"version": "8.0.1",
|
"version": "8.0.2",
|
||||||
"depth": 2,
|
"depth": 2,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -60,12 +60,12 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.2d.psdimporter": {
|
"com.unity.2d.psdimporter": {
|
||||||
"version": "8.0.2",
|
"version": "8.0.4",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.2d.animation": "9.0.1",
|
"com.unity.2d.animation": "9.1.0",
|
||||||
"com.unity.2d.common": "8.0.1",
|
"com.unity.2d.common": "8.0.2",
|
||||||
"com.unity.2d.sprite": "1.0.0"
|
"com.unity.2d.sprite": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
|
@ -109,11 +109,12 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.burst": {
|
"com.unity.burst": {
|
||||||
"version": "1.8.9",
|
"version": "1.8.13",
|
||||||
"depth": 3,
|
"depth": 3,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.mathematics": "1.2.1"
|
"com.unity.mathematics": "1.2.1",
|
||||||
|
"com.unity.modules.jsonserialize": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
@ -153,14 +154,14 @@
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.2d.animation": "9.0.4",
|
"com.unity.2d.animation": "9.1.0",
|
||||||
"com.unity.2d.pixel-perfect": "5.0.3",
|
"com.unity.2d.pixel-perfect": "5.0.3",
|
||||||
"com.unity.2d.psdimporter": "8.0.2",
|
"com.unity.2d.psdimporter": "8.0.4",
|
||||||
"com.unity.2d.sprite": "1.0.0",
|
"com.unity.2d.sprite": "1.0.0",
|
||||||
"com.unity.2d.spriteshape": "9.0.2",
|
"com.unity.2d.spriteshape": "9.0.2",
|
||||||
"com.unity.2d.tilemap": "1.0.0",
|
"com.unity.2d.tilemap": "1.0.0",
|
||||||
"com.unity.2d.tilemap.extras": "3.1.2",
|
"com.unity.2d.tilemap.extras": "3.1.2",
|
||||||
"com.unity.2d.aseprite": "1.0.1"
|
"com.unity.2d.aseprite": "1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.feature.development": {
|
"com.unity.feature.development": {
|
||||||
|
@ -169,16 +170,16 @@
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ide.visualstudio": "2.0.22",
|
"com.unity.ide.visualstudio": "2.0.22",
|
||||||
"com.unity.ide.rider": "3.0.26",
|
"com.unity.ide.rider": "3.0.28",
|
||||||
"com.unity.ide.vscode": "1.2.5",
|
"com.unity.ide.vscode": "1.2.5",
|
||||||
"com.unity.editorcoroutines": "1.0.0",
|
"com.unity.editorcoroutines": "1.0.0",
|
||||||
"com.unity.performance.profile-analyzer": "1.2.2",
|
"com.unity.performance.profile-analyzer": "1.2.2",
|
||||||
"com.unity.test-framework": "1.1.33",
|
"com.unity.test-framework": "1.1.33",
|
||||||
"com.unity.testtools.codecoverage": "1.2.4"
|
"com.unity.testtools.codecoverage": "1.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "3.0.26",
|
"version": "3.0.28",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -242,7 +243,7 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.testtools.codecoverage": {
|
"com.unity.testtools.codecoverage": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.5",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in New Issue