diff --git a/Assets/SuperMultiplayerShooter/MainMenu.unity b/Assets/SuperMultiplayerShooter/MainMenu.unity index 0ca4691..8687e77 100644 --- a/Assets/SuperMultiplayerShooter/MainMenu.unity +++ b/Assets/SuperMultiplayerShooter/MainMenu.unity @@ -3570,6 +3570,10 @@ MonoBehaviour: lobbyBrowserPanel: {fileID: 1479979442} settingsPanel: {fileID: 559747124} cosmeticsPanel: {fileID: 354881817} + nameChangeBtn: {fileID: 1010954172} + chatBtn: {fileID: 879919664} + friendsBtn: {fileID: 1240961055} + settingsBtn: {fileID: 877440447} --- !u!4 &232236243 Transform: m_ObjectHideFlags: 0 @@ -3656,6 +3660,7 @@ MonoBehaviour: mapNameText: {fileID: 1581604309} mapSelector: {fileID: 1734644610} playerNumberSelector: {fileID: 1518742901} + gameLengthSelector: {fileID: 1438673503} enableBotsOption: {fileID: 1353394670} playerItemPrefab: {fileID: 114910820200395234, guid: 302da5ffb21316a458cab6b9a0d35618, type: 3} @@ -9947,6 +9952,7 @@ RectTransform: - {fileID: 1345642180} - {fileID: 1308355066} - {fileID: 882806906} + - {fileID: 1010954171} m_Father: {fileID: 748362461} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -10365,7 +10371,7 @@ PrefabInstance: - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, type: 3} propertyPath: m_RootOrder - value: 4 + value: 5 objectReference: {fileID: 0} - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, type: 3} @@ -10623,7 +10629,7 @@ MonoBehaviour: m_PressedTrigger: Pressed m_SelectedTrigger: Selected m_DisabledTrigger: Disabled - m_Interactable: 1 + m_Interactable: 0 m_TargetGraphic: {fileID: 877440448} m_OnClick: m_PersistentCalls: @@ -10693,6 +10699,11 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Interactable + value: 0 + objectReference: {fileID: 0} - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, type: 3} propertyPath: m_Colors.m_NormalColor.b @@ -12095,7 +12106,7 @@ PrefabInstance: - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, type: 3} propertyPath: m_RootOrder - value: 3 + value: 4 objectReference: {fileID: 0} - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, type: 3} @@ -12276,7 +12287,7 @@ MonoBehaviour: m_PressedTrigger: Pressed m_SelectedTrigger: Highlighted m_DisabledTrigger: Disabled - m_Interactable: 1 + m_Interactable: 0 m_TargetGraphic: {fileID: 955438366} m_TextComponent: {fileID: 341251511} m_Placeholder: {fileID: 87443753} @@ -12290,25 +12301,16 @@ MonoBehaviour: m_CharacterLimit: 12 m_OnSubmit: m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 232236242} - m_TargetAssemblyTypeName: - m_MethodName: SetPlayerName - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 + m_Calls: [] m_OnDidEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: m_PersistentCalls: m_Calls: - m_Target: {fileID: 232236242} m_TargetAssemblyTypeName: Visyde.SampleMainMenu, Assembly-CSharp - m_MethodName: SetPlayerName + m_MethodName: OnUserNameChanged m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -12318,9 +12320,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -12685,233 +12684,479 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1004758687} m_CullTransparentMesh: 0 ---- !u!1 &1018942765 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1018942766} - - component: {fileID: 1018942769} - - component: {fileID: 1018942768} - - component: {fileID: 1018942767} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1018942766 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1018942765} - 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: 1624788090} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0.000038147, y: 0} - m_SizeDelta: {x: 42.59, y: 35.34} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1018942767 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1018942765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3} - m_Name: - m_EditorClassIdentifier: - m_EffectColor: {r: 0, g: 0, b: 0, a: 1} - m_EffectDistance: {x: 1, y: -1} - m_UseGraphicAlpha: 1 ---- !u!114 &1018942768 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1018942765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} - m_FontSize: 32 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 2 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 1 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 1 - m_LineSpacing: 1 - m_Text: 5 ---- !u!222 &1018942769 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1018942765} - m_CullTransparentMesh: 0 ---- !u!1 &1042481502 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1042481503} - - component: {fileID: 1042481505} - - component: {fileID: 1042481504} - m_Layer: 5 - m_Name: Arrow - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1042481503 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1042481502} - 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: 730135941} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -15, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1042481504 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1042481502} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1042481505 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1042481502} - m_CullTransparentMesh: 1 ---- !u!1 &1082406253 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1082406257} - - component: {fileID: 1082406256} - - component: {fileID: 1082406255} - - component: {fileID: 1082406254} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1082406254 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1082406253} - m_Enabled: 1 ---- !u!124 &1082406255 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1082406253} - m_Enabled: 1 ---- !u!20 &1082406256 -Camera: +--- !u!1001 &1010954170 +PrefabInstance: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1082406253} - m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.21568629, g: 0.2784314, b: 0.30980393, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 + m_Modification: + m_TransformParent: {fileID: 835134840} + m_Modifications: + - target: {fileID: 1250100938129686, guid: d18077347beaaf9488dcb354122342ec, type: 3} + propertyPath: m_Name + value: NameChangeButton + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Interactable + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_NormalColor.b + value: 0.376602 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_NormalColor.g + value: 0.8584906 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_NormalColor.r + value: 0.39939398 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_PressedColor.b + value: 0.4303854 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_PressedColor.g + value: 0.6117647 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_PressedColor.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_HighlightedColor.b + value: 0.15359557 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_HighlightedColor.g + value: 0.9622642 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Colors.m_HighlightedColor.r + value: 0.14070843 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 559747128} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SaveOptions + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: SetActive + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: SettingsWindow, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 114647086873953546, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Text + value: Update + objectReference: {fileID: 0} + - target: {fileID: 114647086873953546, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_RaycastTarget + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.585 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.7 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.66 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.78 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_SizeDelta.x + value: 246.64478 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_SizeDelta.y + value: 124.924194 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -1.6431885 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d18077347beaaf9488dcb354122342ec, type: 3} +--- !u!224 &1010954171 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + m_PrefabInstance: {fileID: 1010954170} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1010954172 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + m_PrefabInstance: {fileID: 1010954170} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1018942765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1018942766} + - component: {fileID: 1018942769} + - component: {fileID: 1018942768} + - component: {fileID: 1018942767} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1018942766 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1018942765} + 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: 1624788090} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.000038147, y: 0} + m_SizeDelta: {x: 42.59, y: 35.34} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1018942767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1018942765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1018942768 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1018942765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 1 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: 5 +--- !u!222 &1018942769 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1018942765} + m_CullTransparentMesh: 0 +--- !u!1 &1042481502 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1042481503} + - component: {fileID: 1042481505} + - component: {fileID: 1042481504} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1042481503 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1042481502} + 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: 730135941} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1042481504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1042481502} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1042481505 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1042481502} + m_CullTransparentMesh: 1 +--- !u!1 &1082406253 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1082406257} + - component: {fileID: 1082406256} + - component: {fileID: 1082406255} + - component: {fileID: 1082406254} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1082406254 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 +--- !u!124 &1082406255 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 +--- !u!20 &1082406256 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.21568629, g: 0.2784314, b: 0.30980393, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 y: 0 width: 1 height: 1 @@ -14033,6 +14278,11 @@ PrefabInstance: propertyPath: m_Name value: FriendListButton objectReference: {fileID: 0} + - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_Interactable + value: 0 + objectReference: {fileID: 0} - target: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, type: 3} propertyPath: m_Colors.m_NormalColor.b @@ -14301,6 +14551,18 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 1240961053} m_PrefabAsset: {fileID: 0} +--- !u!114 &1240961055 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 114361736765703588, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + m_PrefabInstance: {fileID: 1240961053} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1254514941 GameObject: m_ObjectHideFlags: 0 @@ -15682,7 +15944,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 76.5, y: 145.7} + m_AnchoredPosition: {x: 1, y: 145.7} m_SizeDelta: {x: 36, y: 36} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1353394670 @@ -15880,6 +16142,86 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1357597070} m_CullTransparentMesh: 1 +--- !u!1 &1369071679 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1369071680} + - component: {fileID: 1369071682} + - component: {fileID: 1369071681} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1369071680 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1369071679} + 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: 1438673502} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.00008010864, y: 42.1} + m_SizeDelta: {x: 0.000068665, y: -21.84} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1369071681 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1369071679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 52 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Time (Min) +--- !u!222 &1369071682 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1369071679} + m_CullTransparentMesh: 0 --- !u!1 &1369626773 GameObject: m_ObjectHideFlags: 0 @@ -15958,6 +16300,86 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &1374332559 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1374332560} + - component: {fileID: 1374332562} + - component: {fileID: 1374332561} + m_Layer: 5 + m_Name: NumberText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1374332560 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1374332559} + 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: 1438673502} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0.000019073486, y: -0.1800003} + m_SizeDelta: {x: 0.7099991, y: -15.875} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1374332561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1374332559} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.99296916, b: 0, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 38 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 52 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: 2 +--- !u!222 &1374332562 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1374332559} + m_CullTransparentMesh: 0 --- !u!1 &1387951943 GameObject: m_ObjectHideFlags: 0 @@ -16333,14 +16755,127 @@ MonoBehaviour: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1434322230} + m_GameObject: {fileID: 1434322230} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 85d8f1bc3165dcd4babf872a226042cc, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1434322233 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434322230} + m_CullTransparentMesh: 0 +--- !u!1 &1438673501 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1438673502} + - component: {fileID: 1438673505} + - component: {fileID: 1438673504} + - component: {fileID: 1438673503} + m_Layer: 5 + m_Name: GameLengthOption + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1438673502 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438673501} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1369071680} + - {fileID: 1896444060} + - {fileID: 1681139343} + - {fileID: 1374332560} + m_Father: {fileID: 1950985927} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 143, y: 145.7} + m_SizeDelta: {x: 75.76, y: 51.119995} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1438673503 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438673501} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a2548359f3e75cd45a3cd046a11db5d2, type: 3} + m_Name: + m_EditorClassIdentifier: + items: + - name: + value: 2 + icon: {fileID: 0} + - name: + value: 20 + icon: {fileID: 0} + - name: + value: 60 + icon: {fileID: 0} + loop: 0 + next: {fileID: 1896444057} + prev: {fileID: 1681139344} + nameText: {fileID: 0} + valueText: {fileID: 1374332561} + preview: {fileID: 0} + onChangeSelected: + m_PersistentCalls: + m_Calls: [] + curSelected: 0 +--- !u!114 &1438673504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438673501} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.6509434, g: 0.6509434, b: 0.6509434, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -16357,13 +16892,13 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1434322233 +--- !u!222 &1438673505 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1434322230} + m_GameObject: {fileID: 1438673501} m_CullTransparentMesh: 0 --- !u!1 &1443016216 GameObject: @@ -17097,7 +17632,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: -80.8, y: 145.7} + m_AnchoredPosition: {x: -142, y: 145.7} m_SizeDelta: {x: 75.76, y: 51.119995} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1518742901 @@ -18307,147 +18842,349 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, type: 3} - propertyPath: m_LocalScale.y - value: 1 + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -7.1456 + objectReference: {fileID: 0} + - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 4 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d18077347beaaf9488dcb354122342ec, type: 3} +--- !u!224 &1678179881 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + type: 3} + m_PrefabInstance: {fileID: 1678179880} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1678524370 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1678524371} + - component: {fileID: 1678524373} + - component: {fileID: 1678524372} + m_Layer: 5 + m_Name: NamePosition2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1678524371 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1678524370} + 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: 321064593} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.000025272326, y: 0.000039041} + m_SizeDelta: {x: 110.81, y: 31.85} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1678524372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1678524370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0.95862055, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 1 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '-' +--- !u!222 &1678524373 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1678524370} + m_CullTransparentMesh: 0 +--- !u!1 &1681139342 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1681139343} + - component: {fileID: 1681139346} + - component: {fileID: 1681139345} + - component: {fileID: 1681139344} + m_Layer: 5 + m_Name: PrevButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1681139343 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1681139342} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1438673502} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -34.090027, y: 0.0000095367} + m_SizeDelta: {x: 68.18, y: 44.09} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1681139344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1681139342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.7075472, g: 0.7075472, b: 0.7075472, a: 1} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1681139345} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1438673503} + m_TargetAssemblyTypeName: + m_MethodName: Prev + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1681139345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1681139342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8c886ae311dc0a34689e2347a4cce37d, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1681139346 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1681139342} + m_CullTransparentMesh: 0 +--- !u!1001 &1689352424 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8724934366708842100, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_Name + value: TradingService objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} - propertyPath: m_LocalScale.z - value: 1 + propertyPath: m_RootOrder + value: 10 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} - propertyPath: m_AnchoredPosition.x - value: -7.1456 + propertyPath: m_LocalEulerAnglesHint.x + value: 0 objectReference: {fileID: 0} - - target: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} - propertyPath: m_AnchoredPosition.y - value: 4 + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: d18077347beaaf9488dcb354122342ec, type: 3} ---- !u!224 &1678179881 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 224152535264682104, guid: d18077347beaaf9488dcb354122342ec, - type: 3} - m_PrefabInstance: {fileID: 1678179880} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1678524370 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1678524371} - - component: {fileID: 1678524373} - - component: {fileID: 1678524372} - m_Layer: 5 - m_Name: NamePosition2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1678524371 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1678524370} - 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: 321064593} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -0.000025272326, y: 0.000039041} - m_SizeDelta: {x: 110.81, y: 31.85} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1678524372 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1678524370} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0.95862055, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} - m_FontSize: 32 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 0 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 1 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 1 - m_LineSpacing: 1 - m_Text: '-' ---- !u!222 &1678524373 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1678524370} - m_CullTransparentMesh: 0 + m_SourcePrefab: {fileID: 100100000, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} --- !u!1 &1716671919 GameObject: m_ObjectHideFlags: 0 @@ -19799,6 +20536,139 @@ LightingSettings: m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_PVRTiledBaking: 0 +--- !u!1 &1896444056 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1896444060} + - component: {fileID: 1896444059} + - component: {fileID: 1896444058} + - component: {fileID: 1896444057} + m_Layer: 5 + m_Name: NextButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1896444057 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1896444056} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.7075472, g: 0.7075472, b: 0.7075472, a: 1} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1896444058} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1438673503} + m_TargetAssemblyTypeName: + m_MethodName: Next + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1896444058 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1896444056} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8c886ae311dc0a34689e2347a4cce37d, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1896444059 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1896444056} + m_CullTransparentMesh: 0 +--- !u!224 &1896444060 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1896444056} + 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: 1438673502} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 34.09, y: -0.0000066757} + m_SizeDelta: {x: 68.18, y: 44.09} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1900001140 GameObject: m_ObjectHideFlags: 0 @@ -20362,6 +21232,7 @@ RectTransform: - {fileID: 1734644607} - {fileID: 1518742900} - {fileID: 1353394669} + - {fileID: 1438673502} - {fileID: 945352684} - {fileID: 847217822} m_Father: {fileID: 1659291045} diff --git a/Assets/SuperMultiplayerShooter/Scripts/CharacterSelector.cs b/Assets/SuperMultiplayerShooter/Scripts/CharacterSelector.cs index 531d198..566dc0f 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/CharacterSelector.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/CharacterSelector.cs @@ -1,4 +1,5 @@ -using System.Collections; +using PubnubApi; +using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -17,6 +18,9 @@ public class CharacterSelector : MonoBehaviour public Connector connector; public SampleMainMenu mainMenu; + private Pubnub pubnub { get { return PNManager.pubnubInstance.pubnub; } } + + void Start() { DataCarrier.characters = characters; @@ -43,7 +47,7 @@ public void Refresh() } // Character selection: - public void SelectCharacter(CharacterData data) + public async void SelectCharacter(CharacterData data) { // Close the character selection panel: mainMenu.characterSelectionPanel.SetActive(false); @@ -58,6 +62,27 @@ public void SelectCharacter(CharacterData data) } mainMenu.characterIconPresenter.sprite = data.icon; + + //Update local metadata + var metadata = PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom; + if (metadata != null) + { + if (metadata.ContainsKey("chosen_character")) + { + metadata["chosen_character"] = DataCarrier.chosenCharacter; + } + + //First time saving a new hat. + else + { + metadata.Add("chosen_character", DataCarrier.chosenCharacter); + } + + PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom = metadata; + + //Store the new update in the metadata + await PNManager.pubnubInstance.UpdateUserMetadata(pubnub.GetCurrentUserId(), PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Name, metadata); + } } } } diff --git a/Assets/SuperMultiplayerShooter/Scripts/Connector.cs b/Assets/SuperMultiplayerShooter/Scripts/Connector.cs index c70e27d..5a742c7 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/Connector.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/Connector.cs @@ -267,7 +267,7 @@ public void JoinCustomGame(PNRoomInfo room){ // changes (e.g. they go offline) on the same channel but there are other ways to implement a lobby and // room system with PubNub. Alternatively you could use PubNub's message history // to store a created room, then others could read a channel's history to decide which room to join. - public async Task CreateCustomGame(int selectedMap, int maxPlayers, bool allowBots) + public async Task CreateCustomGame(int selectedMap, int maxPlayers, bool allowBots, int gameLength) { if (pubnub != null) { @@ -282,6 +282,7 @@ public async Task CreateCustomGame(int selectedMap, int maxPlayers, bool a metaData["started"] = 0; metaData["map"] = selectedMap; metaData["customAllowBots"] = allowBots ? 1 : 0; + metaData["gameLength"] = gameLength * 60; //Match Duration will be set in seconds string channelName = PubNubUtilities.chanGlobal; PNResult setPresenceStateResponse = await pubnub.SetPresenceState() .Channels(new string[] { channelName }) @@ -625,6 +626,7 @@ private async Task UserIsOnlineOrStateChange(string uuid) int map = System.Convert.ToInt32(userState["map"]); int maxPlayers = System.Convert.ToInt32(userState["maxPlayers"]); bool allowBots = (System.Convert.ToInt32(userState["customAllowBots"]) == 1); + GAME_LENGTH_MAKE_ME_CONFIGURABLE = System.Convert.ToInt32(userState["gameLength"]); string ownerId = (string)userState["ownerId"]; bool inProgress = System.Convert.ToInt32(userState["inProgress"]) == 1; PNRoomInfo roomInfo = new PNRoomInfo(uuid, name, map, maxPlayers, allowBots, roomCounter, GAME_LENGTH_MAKE_ME_CONFIGURABLE); @@ -1057,7 +1059,6 @@ public void PlayerSelected(string action, string id) /// /// Returns the language of the user - /// TODO: Will be replaced by getting the metadata of the user. /// /// public string GetUserLanguage() diff --git a/Assets/SuperMultiplayerShooter/Scripts/CosmeticsSystem/CharacterCustomizer.cs b/Assets/SuperMultiplayerShooter/Scripts/CosmeticsSystem/CharacterCustomizer.cs index 8ea98fb..85d13d5 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/CosmeticsSystem/CharacterCustomizer.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/CosmeticsSystem/CharacterCustomizer.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using Newtonsoft.Json; +using PubnubApi; using PubNubUnityShowcase; using UnityEngine; @@ -23,6 +25,8 @@ public class CharacterCustomizer : MonoBehaviour List curSlots = new List(); // the current instatiated slots PlayerController preview; // the instantiated player prefab for preview + private Pubnub pubnub { get { return PNManager.pubnubInstance.pubnub; } } + // Start is called before the first frame update void Start() { @@ -103,7 +107,7 @@ public void RefreshSlots(){ /// /// Equips an item from the database: /// - public void Equip(CosmeticItemData item){ + public async void Equip(CosmeticItemData item){ switch (item.itemType){ case CosmeticType.Hat: @@ -117,6 +121,27 @@ public void Equip(CosmeticItemData item){ // Refresh the player preview: Cosmetics c = new Cosmetics(DataCarrier.chosenHat); playerPrefabController.cosmeticsManager.Refresh(c); + + //Update metadata + var metadata = PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom; + if(metadata != null) + { + if(metadata.ContainsKey("chosen_hat")) + { + metadata["chosen_hat"] = DataCarrier.chosenHat; + } + + //First time saving a new hat. + else + { + metadata.Add("chosen_hat", DataCarrier.chosenHat); + } + + PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom = metadata; + + //Store the new update in the metadata + await PNManager.pubnubInstance.UpdateUserMetadata(pubnub.GetCurrentUserId(), PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Name, metadata); + } } } } diff --git a/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsList.cs b/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsList.cs index c9097a8..464ad8d 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsList.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsList.cs @@ -79,7 +79,6 @@ private async void OnPnMessage(PNMessageResult result) if(acceptFriend != null) { acceptFriend.tradeButton.gameObject.SetActive(true); - acceptFriend.tradeButton.interactable = false; //To be removed once trading is fully integrated. acceptFriend.acceptButton.gameObject.SetActive(false); acceptFriend.removeButton.name = "remove"; // Used to determine whether or not to remove from friend groups acceptFriend.gameObject.GetComponent().color = Color.white; // change color to show accepted friend. diff --git a/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsListItem.cs b/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsListItem.cs index 2936650..58b6159 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsListItem.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/FriendsList/FriendsListItem.cs @@ -1,5 +1,6 @@ using PubnubApi; using PubNubUnityShowcase; +using System.Threading; using System.Threading.Tasks; using UnityEngine; using UnityEngine.UI; @@ -30,9 +31,9 @@ public void Set(string uuid, string name) userId = uuid; onlineStatus.color = Color.gray; messageButton.onClick.AddListener(() => OnMessageClick()); - //tradeBtn.onClick.AddListener(() => OnTradeClick()); To update when trade is implemented. acceptButton.onClick.AddListener(async () => await OnAcceptFriendClick()); removeButton.onClick.AddListener(async () => await OnRemoveClick()); + tradeButton.onClick.AddListener(() => OnTradeClick()); } /// @@ -45,9 +46,11 @@ public void OnMessageClick() /// /// Called when the user clicks the trade button /// - public void OnTradeClick() + public async void OnTradeClick() { - //TODO, once player trading is integrated. + var cts = new CancellationTokenSource(); + var viewData = await TradingService.Instance.GetViewDataInitiator(userId, cts.Token); + var view = TradingService.Instance.OpenView(viewData, cts.Token); } /// /// Remove friend diff --git a/Assets/SuperMultiplayerShooter/Scripts/Leaderboard.cs b/Assets/SuperMultiplayerShooter/Scripts/Leaderboard.cs index aca5132..f39e888 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/Leaderboard.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/Leaderboard.cs @@ -74,8 +74,7 @@ private async Task PublishMessage(string text, string channel) /// private void OnPnMessage(PNMessageResult result) { - // Enable the button once we have established connection to PubNub, todo it is better to use a status listener here. - // Leaderboard Updates + // Enable the button once we have established connection to PubNub if (result.Channel.Equals(PubNubUtilities.chanLeaderboardSub)) { Dictionary msg = JsonConvert.DeserializeObject>(result.Message.ToString());// as Dictionary; diff --git a/Assets/SuperMultiplayerShooter/Scripts/Lobby Browser System/LobbyBrowserUI.cs b/Assets/SuperMultiplayerShooter/Scripts/Lobby Browser System/LobbyBrowserUI.cs index a9a32fd..024e244 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/Lobby Browser System/LobbyBrowserUI.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/Lobby Browser System/LobbyBrowserUI.cs @@ -23,6 +23,7 @@ public class LobbyBrowserUI : MonoBehaviour public Text mapNameText; public SelectorUI mapSelector; public SelectorUI playerNumberSelector; + public SelectorUI gameLengthSelector; public Toggle enableBotsOption; [Header("Joined Screen:")] @@ -133,7 +134,7 @@ public void Leave() } } public async void Create(){ - await Connector.instance.CreateCustomGame(mapSelector.curSelected, playerNumberSelector.items[playerNumberSelector.curSelected].value, enableBotsOption.isOn); + await Connector.instance.CreateCustomGame(mapSelector.curSelected, playerNumberSelector.items[playerNumberSelector.curSelected].value, enableBotsOption.isOn, gameLengthSelector.items[gameLengthSelector.curSelected].value); } public void StartGame(){ Connector.instance.StartCustomGame(); diff --git a/Assets/SuperMultiplayerShooter/Scripts/PNManager.cs b/Assets/SuperMultiplayerShooter/Scripts/PNManager.cs index 92c9a5a..812bc03 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/PNManager.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/PNManager.cs @@ -37,6 +37,8 @@ public class PNManager : PNManagerBehaviour public PNPresenceEvent onPubNubPresence; public delegate void PNObjectEvent(PNObjectEventResult result); // Receive app context (metadata) updates public PNObjectEvent onPubNubObject; + public delegate void PNStatusEvent(PNStatus status); // Receive status updates + public PNStatusEvent onPubNubStatus; public delegate void PubNubReady(); // PubNub is initialized, ok to call PubNub object public PubNubReady onPubNubReady; @@ -95,6 +97,7 @@ public async Task InitializePubNub() pnListener.onSignal += OnPnSignal; pnListener.onObject += OnPnObject; pnListener.onPresence += OnPnPresence; + pnListener.onStatus += OnPnStatus; await SubscribeToStaticChannels(); try { onPubNubReady(); } catch (System.Exception) { } } @@ -168,6 +171,17 @@ private void OnPnObject(Pubnub pn, PNObjectEventResult result) catch (System.Exception) { } } + // Handler for PubNub Status event. + private void OnPnStatus(Pubnub pn, PNStatus status) + { + // Notify other listeners + try + { + onPubNubStatus(status); + } + catch (System.Exception) { } + } + protected virtual new void OnDestroy() { // Don't want the default destroy behaviour @@ -251,6 +265,9 @@ public async Task GetUserMetadata(string Uuid) customData["hats"] = JsonConvert.SerializeObject(Connector.instance.GenerateRandomHats()); customData["language"] = LocalizationSettings.SelectedLocale.Identifier.Code; customData["60fps"] = false; + customData["chosen_hat"] = DataCarrier.chosenHat; + customData["chosen_character"] = DataCarrier.chosenCharacter; + // Update await UpdateUserMetadata(pubnub.GetCurrentUserId(), pubnub.GetCurrentUserId(), customData); } @@ -331,13 +348,6 @@ public async Task UpdateUserMetadata(string uuid, string name, Dictionary< Custom = setUuidMetadataResult.Custom, Updated = setUuidMetadataResult.Updated }; - - //Update hat inventory. - if (setUuidMetadataResult.Custom != null && setUuidMetadataResult.Custom.ContainsKey("hats")) - { - List availableHats = JsonConvert.DeserializeObject>(setUuidMetadataResult.Custom["hats"].ToString()); - Connector.instance.UpdateAvailableHats(availableHats); - } //Existing player if (PNManager.pubnubInstance.CachedPlayers.ContainsKey(setUuidMetadataResult.Uuid)) diff --git a/Assets/SuperMultiplayerShooter/Scripts/SampleMainMenu.cs b/Assets/SuperMultiplayerShooter/Scripts/SampleMainMenu.cs index 26ee6fb..d980311 100644 --- a/Assets/SuperMultiplayerShooter/Scripts/SampleMainMenu.cs +++ b/Assets/SuperMultiplayerShooter/Scripts/SampleMainMenu.cs @@ -12,6 +12,8 @@ using UnityEngine.Localization; using PubNubUnityShowcase; using System.Runtime.ConstrainedExecution; +using Unity.VisualScripting; +using System; namespace Visyde { @@ -38,9 +40,14 @@ public class SampleMainMenu : MonoBehaviour public GameObject lobbyBrowserPanel; public GameObject settingsPanel; public GameObject cosmeticsPanel; + public Button nameChangeBtn; + public Button chatBtn; + public Button friendsBtn; + public Button settingsBtn; + private Pubnub pubnub { get { return PNManager.pubnubInstance.pubnub; } } - void Awake(){ + void Awake() { Screen.sleepTimeout = SleepTimeout.SystemSetting; } @@ -60,8 +67,12 @@ async void OnPnReady() await PNManager.pubnubInstance.GetAllUserMetadata(); //Loading Player Cache. customMatchBTN.interactable = true; customizeCharacterButton.interactable = true; - // todo set friends button interactable - // todo set chat button interactable + chatBtn.interactable = true; + friendsBtn.interactable = true; + settingsBtn.interactable = true; + playerNameInput.interactable = true; + nameChangeBtn.interactable = true; + nameChangeBtn.onClick.AddListener(async () => await SetPlayerName()); MainMenuSetup(); } @@ -120,9 +131,9 @@ private void OnPnObject(PNObjectEventResult result) }; // Add new or update existing player - if(result.Event.Equals("set")) + if (result.Event.Equals("set")) { - if(PNManager.pubnubInstance.CachedPlayers.ContainsKey(result.UuidMetadata.Uuid)) + if (PNManager.pubnubInstance.CachedPlayers.ContainsKey(result.UuidMetadata.Uuid)) { PNManager.pubnubInstance.CachedPlayers[result.UuidMetadata.Uuid] = meta; } @@ -138,45 +149,57 @@ private void OnPnObject(PNObjectEventResult result) { PNManager.pubnubInstance.CachedPlayers.Remove(result.UuidMetadata.Uuid); } - } + } } } - - // Update is called once per frame + + // Update is called once per frame. + // Note: Ensuring each Gameobject is not null due to the connection not being destroyed when + // transitioning scenes. void Update() { // Handling panels: - customGameRoomPanel.SetActive(Connector.instance.isInCustomGame); + if (customGameRoomPanel != null) + { + customGameRoomPanel.SetActive(Connector.instance.isInCustomGame); + + } // Messages popup system (used for checking if we we're kicked or we quit the match ourself from the last game etc): - if (DataCarrier.message.Length > 0) + if (messagePopupObj != null && DataCarrier.message.Length > 0) { messagePopupObj.SetActive(true); messagePopupText.text = DataCarrier.message; DataCarrier.message = ""; } - //Listen for whenever user opens the chat window. - if (chat.activeSelf == false && (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))) + if (chat != null) { - //Don't allow interaction with chat if windows - if(!characterSelectionPanel.activeSelf && !lobbyBrowserPanel.activeSelf && !settingsPanel.activeSelf && !cosmeticsPanel.activeSelf) + //Listen for whenever user opens the chat window. + if (chat.activeSelf == false && (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))) { - //opens the chat window. - chat.SetActive(true); - } + //Don't allow interaction with chat if windows + if (!characterSelectionPanel.activeSelf && !lobbyBrowserPanel.activeSelf && !settingsPanel.activeSelf && !cosmeticsPanel.activeSelf) + { + //opens the chat window. + chat.SetActive(true); + } + } } - //Don't allow chatting while searching for games. - if(lobbyBrowserPanel.activeSelf && !customGameRoomPanel.activeSelf) + if (lobbyBrowserPanel != null && customGameRoomPanel != null) { - chat.SetActive(false); - } + //Don't allow chatting while searching for games. + if (lobbyBrowserPanel.activeSelf && !customGameRoomPanel.activeSelf) + { + chat.SetActive(false); + } - else - { - chat.SetActive(true); - } + else + { + chat.SetActive(true); + } + } } /// @@ -224,7 +247,7 @@ void OnDestroy() /// Extracts metadata for active user and performs menu setup. /// private void MainMenuSetup() - { + { //Change playerInput name to be set to username of the user as long as the name was originally set. if (PNManager.pubnubInstance.CachedPlayers.Count > 0 && PNManager.pubnubInstance.CachedPlayers.ContainsKey(pubnub.GetCurrentUserId())) { @@ -260,15 +283,68 @@ private void MainMenuSetup() bool.TryParse(customData["60fps"].ToString(), out result); Connector.IsFPSSettingEnabled = result; } + + //Set the Selected Hat + if (customData.ContainsKey("chosen_hat")) + { + int result; + if (Int32.TryParse(customData["chosen_hat"].ToString(), out result)) + { + DataCarrier.chosenHat = result; + } + } + + //Legacy Default situations + else + { + customData.Add("chosen_hat", DataCarrier.chosenHat); + PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom = customData; + } + + //Set the Selected Avatar + if (customData.ContainsKey("chosen_character")) + { + int result; + if (Int32.TryParse(customData["chosen_character"].ToString(), out result)) + { + DataCarrier.chosenCharacter = result; + } + } + + //Legacy Default situations + else + { + customData.Add("chosen_character", DataCarrier.chosenCharacter); + PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom = customData; + } + + //Update the sprite image + characterIconPresenter.sprite = DataCarrier.characters[DataCarrier.chosenCharacter].icon; } - } + } + } + + public void OnUserNameChanged() + { + //Only enable name change button interactivity if there's changes to be made + if (Connector.PNNickName.Equals(playerNameInput.text)) + { + nameChangeBtn.interactable = false; + } + + else + { + nameChangeBtn.interactable = true; + } } - // Changes the player name whenever the user edits the Nickname input (on enter or click out of input field) - public async void SetPlayerName() + // Changes the player name + public async Task SetPlayerName() { await PNManager.pubnubInstance.UpdateUserMetadata(pubnub.GetCurrentUserId(), playerNameInput.text, PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Custom); - Connector.PNNickName = PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Name = playerNameInput.text; + Connector.PNNickName = PNManager.pubnubInstance.CachedPlayers[pubnub.GetCurrentUserId()].Name = playerNameInput.text; + nameChangeBtn.interactable = false; + return true; } } } \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem.meta new file mode 100644 index 0000000..bf72256 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1216c80b095c9e84d860566d212b8c7b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets.meta new file mode 100644 index 0000000..0488840 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fc0f626a3a22fd54db3aab594a042454 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset new file mode 100644 index 0000000..bdf825d --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset @@ -0,0 +1,62 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1ec508bf28a7c9047a548371e4fe3db0, type: 3} + m_Name: lib-cometicItems-hats + m_EditorClassIdentifier: + items: + - itemID: 0 + type: 0 + uiSprite: {fileID: 21300000, guid: bcaf6f9ea721bf44cbc81bf28e406e8e, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 1 + type: 0 + uiSprite: {fileID: 21300000, guid: c4b68ad189434b045ba66f7f50f1c464, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 2 + type: 0 + uiSprite: {fileID: 21300000, guid: b6467fabc621b2f4b8c474eb6c769a56, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 3 + type: 0 + uiSprite: {fileID: 21300000, guid: 2c7b8fbe6e7d949498f66fed83dcdcfd, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 4 + type: 0 + uiSprite: {fileID: 21300000, guid: d33002d88121946cf9041b876a3f3be5, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 5 + type: 0 + uiSprite: {fileID: 21300000, guid: 16140f8d349fb4c67a4622d4dd92d1db, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 6 + type: 0 + uiSprite: {fileID: 21300000, guid: c70035368245a4b8eaf304cf6f40972a, type: 3} + offsetY: 0 + prefab: {fileID: 0} + - itemID: 7 + type: 0 + uiSprite: {fileID: 21300000, guid: 7c84f1b46ce4747d0b03e7bd05414afa, type: 3} + offsetY: -16 + prefab: {fileID: 0} + avatars: + - itemID: 0 + uiSprite: {fileID: 21300000, guid: 5540eda11e3da1b40a05f26a686e7f4c, type: 3} + - itemID: 1 + uiSprite: {fileID: 21300000, guid: 8d3e39403b851af4197e9d4cca9bcffd, type: 3} + - itemID: 2 + uiSprite: {fileID: 21300000, guid: 48acf41ba3fc3d542b95c5380601e49c, type: 3} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset.meta new file mode 100644 index 0000000..e68b371 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Assets/lib-cometicItems-hats.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60ab39eaf186f4a4a82a5e7f6916b88f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs new file mode 100644 index 0000000..e55ed6a --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs @@ -0,0 +1,14 @@ +using UnityEngine; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct AvatarGraphics + { + [SerializeField] private int itemID; + [SerializeField] private Sprite uiSprite; //Sprite for UI + + public int ItemID { get => itemID; } + public Sprite UiSprite { get => uiSprite; } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs.meta new file mode 100644 index 0000000..8227ec5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/AvatarGraphics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1dc1be2754fa2304a85ea20fa48f7977 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs new file mode 100644 index 0000000..6e4adca --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs @@ -0,0 +1,34 @@ +using System; +using UnityEngine; +using Visyde; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct CosmeticItem + { + [SerializeField] private int itemID; + //[SerializeField] private string name; + [SerializeField] private CosmeticType type; + [SerializeField] private Sprite uiSprite; //Sprite for UI + [SerializeField] private float offsetY; //workaround so that hats can align with the body + [SerializeField] private GameObject prefab; //ingame object + + public int ItemID { get => itemID; } + public CosmeticType Type { get => type; } + public Sprite UiSprite { get => uiSprite; } + public float OffsetY { get => offsetY; } + + public override bool Equals(object obj) + { + return obj is CosmeticItem item && + itemID == item.itemID && + type == item.type; + } + + public override int GetHashCode() + { + return HashCode.Combine(itemID, type); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs.meta new file mode 100644 index 0000000..06ec397 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/CosmeticItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8272640ed4cd4b45b855a128a2ac92f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs new file mode 100644 index 0000000..09c46e8 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs @@ -0,0 +1,182 @@ +using PubNubUnityShowcase; +using PubNubUnityShowcase.UIComponents; +using System.Collections; +using System.Collections.Generic; +using System.Net.Sockets; +using UnityEngine; +using static PubNubUnityShowcase.UIComponents.TradingView; + +public abstract class FlowBase +{ + public static string cmdCancel = "action-close"; + public static string cmdOK = "action-OK"; + public static string cmdSendInitial = "action-sendInitial"; + public static string cmdWitdraw = "action-witdraw"; + public static string cmdAccept = "action-accept"; + public static string cmdCounter = "action-counter"; + public static string cmdRefuse = "action-refuse"; + + + private readonly UIComponents _ui; + private readonly Services _services; + private readonly TradingViewStateBase _stateBase; + private readonly TradeSessionData _sessionData; + protected TradingViewStateBase StateBase => _stateBase; + protected TradeSessionData SessionData => _sessionData; + protected UIComponents UI => _ui; + protected Services Services => _services; + public bool TradeInviteResponceReceived { get; set; } + public bool ReceivedOfferResponse { get; set; } + + + + protected FlowBase(TradeSessionData sessionData, TradingViewStateBase stateBase, UIComponents ui, Services services) + { + _sessionData = sessionData; + _ui = ui; + _services = services; + _stateBase = stateBase; + _sessionData = sessionData; + } + + public abstract void Load(); + public abstract void Unload(); + + + protected void InitializeUIElements() + { + if (StateBase.UIElementsInitialized) + return; + + //Initialize UI Elements + UI.OfferPanel.Construct(); + UI.InventoryInitiator.Construct(Services.HatsLibrary, 8); + UI.InventoryRespondent.Construct(Services.HatsLibrary, 8); + UI.AvatarInitiator.Construct(Services.Avatars, Services.HatsLibrary, UI.OfferPanel.ResponderSlot, UI.InventoryInitiator, SessionData.Initiator.EquippedCosmetic); + UI.AvatarRespondent.Construct(Services.Avatars, Services.HatsLibrary, UI.OfferPanel.InitiatorSlot, UI.InventoryRespondent, SessionData.Respondent.EquippedCosmetic); + + StateBase.UIElementsInitialized = true; + } + + protected void RefreshAvatars(TraderData initiator, TraderData respondent) + { + UI.AvatarInitiator.SetNickname(initiator.DisplayName); + UI.AvatarInitiator.SetHat(initiator.EquippedCosmetic); + UI.AvatarInitiator.SetBody(initiator.PlayerAvatarType); + UI.AvatarInitiator.SetLookDirection(1); + + UI.AvatarRespondent.SetNickname(respondent.DisplayName); + UI.AvatarRespondent.SetHat(respondent.EquippedCosmetic); + UI.AvatarRespondent.SetBody(respondent.PlayerAvatarType); + UI.AvatarRespondent.SetLookDirection(-1); + } + + protected void RefreshInventories(TradeInventoryData initiator, TradeInventoryData respondent) + { + UI.InventoryInitiator.UpdateData(initiator); + UI.InventoryRespondent.UpdateData(respondent); + } + + protected void DisableDuplicateItems() + { + //Check duplicates + UI.InventoryRespondent.CheckDuplicates(UI.InventoryInitiator.GetCosmetics(), true); + UI.InventoryInitiator.CheckDuplicates(UI.InventoryRespondent.GetCosmetics(), true); + } + + protected void FillOfferPanelFromInventories(OfferData offerData) + { + //Fill offer panel + UI.InventoryInitiator.RemoveItem(Services.HatsLibrary.GetCosmeticItem(offerData.InitiatorGives)); + UI.OfferPanel.InitiatorSlot.SetItem(Services.HatsLibrary.GetCosmeticItem(offerData.InitiatorGives)); + + UI.InventoryRespondent.RemoveItem(Services.HatsLibrary.GetCosmeticItem(offerData.InitiatorReceives)); + UI.OfferPanel.ResponderSlot.SetItem(Services.HatsLibrary.GetCosmeticItem(offerData.InitiatorReceives)); + } + + protected void BindOfferTransfers(bool enabled) + { + if (enabled) + { + UI.OfferPanel.ItemTakenInitiator += OnOfferPanelInitiatorTaken; + UI.OfferPanel.ItemTakenResponder += OnOfferPanelRespondentTaken; + UI.InventoryInitiator.ItemTaken += OnInitiatorInventoryTake; + UI.InventoryRespondent.ItemTaken += OnRespondentInventoryTake; + } + else + { + UI.OfferPanel.ItemTakenInitiator -= OnOfferPanelInitiatorTaken; + UI.OfferPanel.ItemTakenResponder -= OnOfferPanelRespondentTaken; + UI.InventoryInitiator.ItemTaken -= OnInitiatorInventoryTake; + UI.InventoryRespondent.ItemTaken -= OnRespondentInventoryTake; + } + } + + protected void OfferSetLocked(bool locked) + { + UI.OfferPanel.SetLocked(locked); + } + + protected void InventoriesVisibility(bool visible) + { + UI.InventoryInitiator.SetVisibility(visible); + UI.InventoryRespondent.SetVisibility(visible); + } + + protected void OnOfferPanelInitiatorTaken(CosmeticItem item) + { + + UI.InventoryInitiator.PutAnywhere(item); + InventoriesVisibility(true); + } + + protected void OnOfferPanelRespondentTaken(CosmeticItem item) + { + UI.InventoryRespondent.PutAnywhere(item); + InventoriesVisibility(true); + } + protected void OnInitiatorInventoryTake(CosmeticItem cosmeticItem) + { + if (UI.OfferPanel.InitiatorSlot.IsFull) + { + var temp = UI.OfferPanel.InitiatorSlot.Item; + UI.OfferPanel.InitiatorSlot.SetEmpty(); + UI.OfferPanel.SetInitiatorGive(cosmeticItem); + UI.InventoryInitiator.PutAnywhere(temp); + } + else + { + UI.OfferPanel.SetInitiatorGive(cosmeticItem); + } + } + + protected void OnRespondentInventoryTake(CosmeticItem cosmeticItem) + { + if (UI.OfferPanel.ResponderSlot.IsFull) + { + var temp = UI.OfferPanel.ResponderSlot.Item; + UI.OfferPanel.ResponderSlot.SetEmpty(); + UI.OfferPanel.SetInitiatorReceive(cosmeticItem); + UI.InventoryRespondent.PutAnywhere(temp); + } + else + { + UI.OfferPanel.SetInitiatorReceive(cosmeticItem); + } + } + + public void ShowSessionResult(string message) + { + UI.Actions.RemoveAll(); + UI.Actions.AddButton(cmdOK, "OK", OnBtnClose); + UI.Actions.SetButtonInteractable(cmdOK, true); + InventoriesVisibility(false); + UI.OfferPanel.SetLocked(true); + UI.OfferPanel.SetSessionStatus(message); + } + + protected void OnBtnClose(string _) + { + StateBase.InvokeCloseViewRequest(); + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs.meta new file mode 100644 index 0000000..cd6f674 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 533bc7efc6b165745bf4fade70e33671 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs new file mode 100644 index 0000000..1665636 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace PubNubUnityShowcase.UIComponents +{ + public class FlowCreateInitialOffer : FlowBase + { + public FlowCreateInitialOffer(TradeSessionData sessionData, TradingViewStateBase stateBase, TradingView.UIComponents ui, TradingView.Services services) : base(sessionData, stateBase, ui, services) + { + } + + public override void Load() + { + InitializeUIElements(); + BindOfferTransfers(true); + + RefreshAvatars(SessionData.Initiator, SessionData.Respondent); + RefreshInventories(SessionData.Initiator.Inventory, SessionData.Respondent.Inventory); + DisableDuplicateItems(); + + UI.OfferPanel.SetSessionStatus("Make your offer"); + + + UI.OfferPanel.AnyChange += OnAnyOfferChange; + + //Add buttons + UI.Actions.AddButton(cmdCancel, "Cancel", OnBtnClose); + } + + public override void Unload() + { + BindOfferTransfers(false); + UI.Actions.RemoveAll(); + + UI.OfferPanel.AnyChange -= OnAnyOfferChange; + } + + private void OnAnyOfferChange() + { + if (UI.OfferPanel.HaveValidOffer) + { + UI.Actions.AddButton(cmdSendInitial, "Propose", OnSendInitialOffer); + SortButtons(); + } + else + { + UI.Actions.RemoveButton(cmdSendInitial); + } + } + + private async void OnSendInitialOffer(string _) + { + UI.Actions.RemoveButton(cmdSendInitial); + UI.Actions.RemoveButton(cmdCancel); + UI.Actions.AddButton(cmdWitdraw, "Withdraw", OnWitdraw); + UI.Actions.SetButtonInteractable(cmdWitdraw, false); + + OfferSetLocked(true); + InventoriesVisibility(false); + + var cts = new CancellationTokenSource(10000); + + var sentOffer = OfferData.GenerateInitialOffer(UI.OfferPanel.InitiatorSlot.Item.ItemID, UI.OfferPanel.ResponderSlot.Item.ItemID, false); + await Services.Trading.SendInviteAsync(sentOffer); + + TradeInviteResponceReceived = false; + int time = 0; + + try + { + while (TradeInviteResponceReceived == false) + { + string targetName = SessionData.GetParticipant(sentOffer.Target).DisplayName; + + UI.OfferPanel.SetSessionStatus($"Awaiting {targetName}'s response ({time / 1000})"); + cts.Token.ThrowIfCancellationRequested(); + await Task.Delay(100); + time += 100; + await Task.Yield(); + } + + UI.Actions.SetButtonInteractable(cmdWitdraw, true); + } + catch (OperationCanceledException e) when (e.CancellationToken == cts.Token) + { + ShowSessionResult($"No response from {SessionData.Respondent.DisplayName}"); + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.otherPartyNotResponding)); + } + } + + private async void OnWitdraw(string _) + { + UI.Actions.RemoveButton(cmdWitdraw); + ShowSessionResult($"offer withdrawn"); + + LeaveSessionData leaveData = new LeaveSessionData(SessionData.Initiator, LeaveReason.withdrawOffer); + await Services.Trading.LeaveSessionAsync(leaveData); + } + + private void SortButtons() + { + var priority = new List + { + cmdCancel, + cmdSendInitial, + }; + UI.Actions.Arrange(priority); + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs.meta new file mode 100644 index 0000000..6489e64 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowCreateInitialOffer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a5cf35c4c8f58b42b8c6f4e13abf4cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs new file mode 100644 index 0000000..6649117 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Unity.VisualScripting; +using UnityEngine; + +namespace PubNubUnityShowcase.UIComponents +{ + public class FlowOfferReceived : FlowBase + { + private readonly OfferData _receivedOffer; + + public FlowOfferReceived(OfferData offerReceived, TradeSessionData sessionData, TradingViewStateBase stateBase, TradingView.UIComponents ui, TradingView.Services services) : base(sessionData, stateBase, ui, services) + { + _receivedOffer = offerReceived; + } + + private OfferData ReceivedOffer => _receivedOffer; + + private bool SameOffer => _receivedOffer.InitiatorGives == UI.OfferPanel.InitiatorSlot.Item.ItemID && _receivedOffer.InitiatorReceives == UI.OfferPanel.ResponderSlot.Item.ItemID; + + public override void Load() + { + InitializeUIElements(); + BindOfferTransfers(true); + + RefreshAvatars(SessionData.Initiator, SessionData.Respondent); + RefreshInventories(SessionData.Initiator.Inventory, SessionData.Respondent.Inventory); + DisableDuplicateItems(); + + UI.OfferPanel.SetSessionStatus($"{SessionData.GetParticipant(ReceivedOffer.Sender).DisplayName}'s offer"); + FillOfferPanelFromInventories(ReceivedOffer); + + UI.OfferPanel.AnyChange += OnAnyOfferChange; + + //Add buttons + UI.Actions.AddButton(cmdAccept, "Accept", OnBtnAccept); + UI.Actions.AddButton(cmdRefuse, "Refuse", OnBtnRefuse); + SortButtons(); + + if (ReceivedOffer.Version > 0) + UI.OfferPanel.SetLabel("Counteroffer"); + else + UI.OfferPanel.SetLabel("Offer"); + + bool canEdit = ReceivedOffer.Version > 2 || ReceivedOffer.FinalOffer; + + OfferSetLocked(canEdit); + InventoriesVisibility(canEdit); + } + + public override void Unload() + { + BindOfferTransfers(false); + UI.Actions.RemoveAll(); + + UI.OfferPanel.AnyChange -= OnAnyOfferChange; + } + + private void OnAnyOfferChange() + { + if (SameOffer) + { + UI.Actions.RemoveButton(cmdCounter); + UI.Actions.AddButton(cmdAccept, "Accept", OnBtnAccept); + UI.Actions.SetButtonInteractable(cmdAccept, UI.OfferPanel.HaveValidOffer); + } + else + { + UI.Actions.RemoveButton(cmdAccept); + UI.Actions.AddButton(cmdCounter, "Counter", OnBtnCounteroffer); + UI.Actions.SetButtonInteractable(cmdCounter, UI.OfferPanel.HaveValidOffer); //this shoudn't be possible + } + + SortButtons(); + } + + #region Button Actions + private void OnBtnAccept(string _) + { + var offer = OfferData.GetAcceptedOffer(ReceivedOffer); + Services.Trading.SendOfferAsync(offer); + + UI.Actions.RemoveAll(); + } + + private void OnBtnRefuse(string _) + { + var offer = OfferData.GetRejectedOffer(ReceivedOffer); + Services.Trading.SendOfferAsync(offer); + + UI.Actions.RemoveAll(); + } + + private async void OnBtnCounteroffer(string _) + { + Debug.Log("----->>OnBtnCounter"); + + var offer = OfferData.GenerateCounterlOffer(ReceivedOffer, UI.OfferPanel.InitiatorSlot.Item.ItemID, UI.OfferPanel.ResponderSlot.Item.ItemID, false); + Debug.Log($"send: ---> offer"); + await Services.Trading.SendOfferAsync(offer); + + UI.Actions.RemoveAll(); + UI.Actions.AddButton(cmdWitdraw, "Withdraw", OnBtnWithdrawCounter); + //UI.Actions.SetButtonInteractable(cmdWitdraw, false); + + OfferSetLocked(true); + InventoriesVisibility(false); + + ReceivedOfferResponse = false; + + var cts = new CancellationTokenSource(30000); //30 sec hardcode timeout + int time = 0; + try + { + while (ReceivedOfferResponse == false) + { + string targetName = SessionData.GetParticipant(offer.Target).DisplayName; + UI.OfferPanel.SetSessionStatus($"Awaiting response from {targetName} ({time / 1000})"); + cts.Token.ThrowIfCancellationRequested(); + await Task.Delay(100); + time += 100; + await Task.Yield(); + } + + //UI.Actions.SetButtonInteractable(cmdWitdraw, true); + } + catch (OperationCanceledException e) when (e.CancellationToken == cts.Token) + { + ShowSessionResult($"No response from {offer.Target}"); + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.otherPartyNotResponding)); + UI.Actions.SetButtonInteractable(cmdWitdraw, true); + } + } + + private async void OnBtnWithdrawCounter(string _) + { + ReceivedOfferResponse = true; + UI.Actions.RemoveButton(cmdWitdraw); + ShowSessionResult($"offer withdrawn"); + + var thisParticipant = SessionData.GetParticipant(ReceivedOffer.Target); + LeaveSessionData leaveData = new LeaveSessionData(thisParticipant, LeaveReason.withdrawOffer); + await Services.Trading.LeaveSessionAsync(leaveData); + } + + #endregion + + private void SortButtons() + { + var priority = new List + { + cmdRefuse, + cmdCounter, + cmdAccept + }; + + UI.Actions.Arrange(priority); + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs.meta new file mode 100644 index 0000000..d69341e --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowOfferReceived.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3869017e8cf5bea46a7eac98b64281e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs new file mode 100644 index 0000000..33de1fe --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs @@ -0,0 +1,34 @@ +namespace PubNubUnityShowcase.UIComponents +{ + public class FlowSessionClosed : FlowBase + { + private string _message; + + public FlowSessionClosed(string message, TradeSessionData sessionData, TradingViewStateBase stateBase, TradingView.UIComponents ui, TradingView.Services services) : base(sessionData, stateBase, ui, services) + { + _message = message; + } + + public override void Load() + { + UI.Actions.RemoveAll(); + UI.Actions.AddButton(cmdOK,"OK", OnBtnOK); + UI.Actions.SetButtonInteractable(cmdOK, true); + + InventoriesVisibility(false); + + OfferSetLocked(true); + UI.OfferPanel.SetSessionStatus(_message); + } + + public override void Unload() + { + + } + + private void OnBtnOK(string _) + { + StateBase.InvokeCloseViewRequest(); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs.meta new file mode 100644 index 0000000..bedc8dc --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/FlowSessionClosed.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9533790d30be5fb4ea4407d72a9766de +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs new file mode 100644 index 0000000..6c49b1f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs @@ -0,0 +1,7 @@ +namespace PubNubUnityShowcase +{ + public interface IAvatarLibrary + { + AvatarGraphics GetAvatar(int key); + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs.meta new file mode 100644 index 0000000..25095eb --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IAvatarLibrary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08226dd75d7455c49ae74a18ea522d92 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs new file mode 100644 index 0000000..4991581 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Visyde; + +namespace PubNubUnityShowcase +{ + //NOTE: its implemented as interface so that later it would be easier to refactor it for using Addressables + + /// + /// Library to get cosmetic items data + /// + public interface ICosmeticItemLibrary + { + CosmeticItem GetCosmeticItem(int index); + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs.meta new file mode 100644 index 0000000..247ec05 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ICosmeticItemLibrary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b38f6dc12b5ce4b47b1a6bd0298bbbc2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs new file mode 100644 index 0000000..113190c --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs @@ -0,0 +1,12 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + public interface IJsonSerializable + { + string RawJson => JsonConvert.SerializeObject(this); + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs.meta new file mode 100644 index 0000000..1a0feeb --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/IJsonSerializable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a95d4de52555e0c41baa62e0071432e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs new file mode 100644 index 0000000..2d06c07 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs @@ -0,0 +1,15 @@ +using PubNubUnityShowcase; + +namespace PubNubUnityShowcase +{ + /// + /// Game objects that can react to Trade invites + /// + /// note: this can be used for Game Controllers, UI, Notifications, SFX etc.. + public interface ITradeInviteSubscriber + { + void OnTradeInviteReceived(TradeInvite invite); + void OnTradeInviteWithdrawn(TradeInvite invite); + void OntradeInviteResponse(InviteResponseData response); + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs.meta new file mode 100644 index 0000000..9d80f2b --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeInviteSubscriber.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66cffef48af00394694bba13b7b77860 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs new file mode 100644 index 0000000..8143419 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs @@ -0,0 +1,20 @@ +using PubNubUnityShowcase; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public interface ITradeSessionSubscriber +{ + void OnParticipantJoined(TraderData participant); + + /// + /// Should only happen when the other participant leaves + /// + void OnParticipantGoodbyeAsync(LeaveSessionData leaveData); + + void OnTradingCompleted(OfferData offerData); + + void OnCounterOffer(OfferData offerData); + + void OnLeftUnknownReason(TraderData participant); +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs.meta new file mode 100644 index 0000000..0d877dc --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradeSessionSubscriber.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ffd9e8d91ae7b84bb4fe0a7a1c69de5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs new file mode 100644 index 0000000..9ef8042 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs @@ -0,0 +1,49 @@ +using System.Threading.Tasks; + +namespace PubNubUnityShowcase +{ + /// + /// Trading Controller + /// + public interface ITrading + { + /// To receive trading Invites + void JoinTradingAsync(); + + /// To stop receiving trading Invites + Task DisconnectTradingAsync(); + + /// + /// Initialize session as Initiator (Local only) + /// + /// + /// + TradeSessionData GenerateSessionData(TraderData initiator, TraderData respondent); + + /// + /// Join Session as Respondent + /// + Task JoinSessionAsync(TradeSessionData session); + + /// + /// Announce the session to the respondent (with offer) + /// + /// Milliseconds + Task SendInviteAsync(OfferData offer); + + Task InviteRespondAsync(TradeInvite invite, InviteResponseData response); + + Task LeaveSessionAsync(LeaveSessionData leaveData); + + Task SendOfferAsync(OfferData offer); + + /// Don't forget to unsubscribe! + void SubscribeTradeInvites(ITradeInviteSubscriber subscriber); + + /// Don't forget to unsubscribe! + void SubscribeSessionEvents(ITradeSessionSubscriber subscriber); + + void UnsubscribeTradeInvites(ITradeInviteSubscriber subscriber); + void UnsubscribeSessionEvents(ITradeSessionSubscriber subscriber); + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs.meta new file mode 100644 index 0000000..66c5118 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITrading.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36a2bd018590de04ebbf0f9cf2def893 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs new file mode 100644 index 0000000..9ad214c --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace PubNubUnityShowcase +{ + public interface ITradingDatastore + { + Task GetTraderData(string traderID); + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs.meta new file mode 100644 index 0000000..779dab9 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ITradingDatastore.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63a1cacf753794845ac2614c359bcc9a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs new file mode 100644 index 0000000..b29b7b4 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs @@ -0,0 +1,15 @@ +using PubNubUnityShowcase; + +public struct InviteResponseData : IJsonSerializable +{ + public InviteResponseData(bool willJoin, bool inTradingSession, bool inGameOrLobby) + { + WillJoin = willJoin; + InGameOrLobby = inGameOrLobby; + InTradingSession = inTradingSession; + } + + public bool WillJoin { get; set; } + public bool InGameOrLobby { get; set; } + public bool InTradingSession { get; set; } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs.meta new file mode 100644 index 0000000..6a19455 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/InviteResponseData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 119d9c2709fadeb4f863cc0f3a25cce3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs new file mode 100644 index 0000000..b526cee --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs @@ -0,0 +1,22 @@ +namespace PubNubUnityShowcase +{ + public struct LeaveSessionData : IJsonSerializable + { + public LeaveSessionData(TraderData participant, LeaveReason reason) + { + Participant = participant; + Reason = reason; + } + + public TraderData Participant { get; set; } + public LeaveReason Reason { get; set; } + } + + public enum LeaveReason + { + withdrawOffer = 1, + transactionComplete = 2, + otherPartyBusy = 3, + otherPartyNotResponding = 4 + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs.meta new file mode 100644 index 0000000..9c744ed --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/LeaveSessionData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cc7bca2f757307a40a7ce36053b7d92a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs new file mode 100644 index 0000000..ab0391e --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; +using PubNubUnityShowcase; +using System; +using System.Collections.Generic; +using UnityEngine; + +public class MessageNormalilzation : MonoBehaviour +{ + public const string TYPE_KEY = "payload_type"; + public const string COMMAND_KEY = "string"; + + public static Dictionary GetCommandMeta() + { + return new Dictionary + { + { TYPE_KEY, COMMAND_KEY } + }; + } + + public static Dictionary GetMeta() where T : struct, IJsonSerializable + { + return new Dictionary + { + { TYPE_KEY, $"{typeof(T).Name}" } + }; + } + + public static T GetPayload(object obj) where T : struct, IJsonSerializable + { + try + { + T payload = (T)JsonConvert.DeserializeObject(obj.ToString(), typeof(T)); + return payload; + } + catch (Exception e) + { + Debug.LogException(e); + return default; + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs.meta new file mode 100644 index 0000000..6673332 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MessageNormalilzation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bb39a329f1eeb648912d4be8d3729ed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs new file mode 100644 index 0000000..67e0657 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs @@ -0,0 +1,56 @@ +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Visyde; + +namespace PubNubUnityShowcase +{ + public static class MetadataNormalization + { + /// This is AppContext's UserMetadata.Custom + public static List GetHats(Dictionary customData) + { + List availableHats = new List(); + + if (customData != null) + { + if (customData.ContainsKey("hats")) + { + availableHats = JsonConvert.DeserializeObject>(customData["hats"].ToString()); + } + } + + return availableHats; + } + + + /// This is AppContext's UserMetadata.Custom + public static void ReplaceHats(string userId, Dictionary customMetadata, int existing, int newHat) + { + string old = JsonConvert.SerializeObject(customMetadata); + + List currentInventory = GetHats(customMetadata); + List updatedInventory = currentInventory.Select(hat => hat == existing ? newHat : hat).ToList(); + //note: hats' keyvalue is seriliazed as not as > !!! + string listAsJson = JsonConvert.SerializeObject(updatedInventory); + customMetadata["hats"] = listAsJson; + + //Update current inventory. + if(userId.Equals(PNManager.pubnubInstance.pubnub.GetCurrentUserId())) + { + //If the hat that is being traded away is currently equipped, equip the new hat that was just tradded to the user. + if (DataCarrier.chosenHat == existing) + { + DataCarrier.chosenHat = newHat; + customMetadata["chosen_hat"] = DataCarrier.chosenHat; + } + + Connector.instance.UpdateAvailableHats(updatedInventory); + } + + //For any player, update the CachedPlayersList with the new updated inventory + PNManager.pubnubInstance.CachedPlayers[userId].Custom = customMetadata; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs.meta new file mode 100644 index 0000000..0533c69 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MetadataNormalization.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7005a2cfde39cd4bb8ddd1683210907 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs new file mode 100644 index 0000000..875e014 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs @@ -0,0 +1,39 @@ +using PubnubApi; +using PubNubUnityShowcase; +using PubNubUnityShowcase.UIComponents; +using System.Threading; +using UnityEngine; + +public class MockLauncher : MonoBehaviour +{ + [SerializeField] private TradingService tradingService; + + [Header("Mock Data")] + [SerializeField] private TradeSessionData mockSession; + [SerializeField] private OfferData mockOffer; + [SerializeField] private TradingView view; + + #region UnityEvents (for Buttons setup manually in the Editor) + + public async void OnBtnOpenInitiator() + { + var cts = new CancellationTokenSource(); + var viewData = await TradingService.Instance.GetViewDataInitiator(mockSession.Respondent.UserID, cts.Token); + var view = TradingService.Instance.OpenView(viewData, cts.Token); + } + + public void OnBtnOpenRespondent() + { + var cts = new CancellationTokenSource(); + var viewData = tradingService.GetViewDataRespondent(mockSession, mockOffer, cts.Token); + tradingService.OpenView(viewData, cts.Token); + } + + public void OnBtnClose() + { + if (view == null) + return; + tradingService.CloseView(); + } + #endregion +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs.meta new file mode 100644 index 0000000..bb72f48 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/MockLauncher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7cd08f9a41825e44382f1b5f2259539d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs new file mode 100644 index 0000000..204e23f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs @@ -0,0 +1,106 @@ +using Newtonsoft.Json; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct OfferData : IJsonSerializable + { + [SerializeField] private int initiatorGives; + [SerializeField] private int initiatorReceives; + [SerializeField] private bool final; + [SerializeField] private TradeSessionData.Role target; + [SerializeField] private int version; + [SerializeField] private OfferState state; + + /// + /// Initial Offer + /// + private OfferData(TradeSessionData.Role target, int initiatorGives, int initiatorReceives, bool final, OfferState state, int version) + { + this.target = target; + this.initiatorGives = initiatorGives; + this.initiatorReceives = initiatorReceives; + this.final = final; + this.version = version; + this.state = state; + } + + public TradeSessionData.Role Target { get => target; set => target = value; } + public int InitiatorGives { get => initiatorGives; set => initiatorGives = value; } + public int InitiatorReceives { get => initiatorReceives; set => initiatorReceives = value; } + public bool FinalOffer { get => final; set => final = value; } + public int Version { get => version; set => version = value; } + public OfferState State { get => state; set => state = value; } + + [JsonIgnore] + public TradeSessionData.Role Sender => Flip(target); + + public static OfferData GenerateInitialOffer(int initiatorGives, int initiatorReceives, bool final) + { + return new OfferData( + TradeSessionData.Role.Respondent, + initiatorGives, + initiatorReceives, + final, + OfferState.open, + 0); + } + + public static OfferData GetAcceptedOffer(OfferData original) + { + return new OfferData( + Flip(original.Target), + original.InitiatorGives, + original.InitiatorReceives, + true, + OfferState.accepted, + original.version); + } + + public static OfferData GetRejectedOffer(OfferData original) + { + return new OfferData( + Flip(original.Target), + original.InitiatorGives, + original.InitiatorReceives, + true, + OfferState.rejected, + original.version); + } + + public static OfferData GenerateCounterlOffer(OfferData original, int initiatorGives, int initiatorReceives, bool final) + { + return new OfferData( + Flip(original.Target), + initiatorGives, + initiatorReceives, + final, + OfferState.open, + original.version += 1); + } + + + public static TradeSessionData.Role Flip(TradeSessionData.Role role) + { + if (role == TradeSessionData.Role.Initiator) + return TradeSessionData.Role.Respondent; + else + return TradeSessionData.Role.Initiator; + } + + public enum OfferState + { + open, + accepted, + rejected + } + + public override bool Equals(object obj) + { + return obj is OfferData data && + initiatorGives == data.initiatorGives && + initiatorReceives == data.initiatorReceives; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs.meta new file mode 100644 index 0000000..42d1199 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/OfferData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 949f4e7da939b9849804392bbd12584d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs.meta new file mode 100644 index 0000000..4ffec7d --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28ebdb32dd1cf094fa463f1de3f26c5e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab new file mode 100644 index 0000000..8df1b1c --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab @@ -0,0 +1,879 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &142410944142034183 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5854170000784374064} + - component: {fileID: 1817286248328936683} + - component: {fileID: 5062998508548426256} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5854170000784374064 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 142410944142034183} + 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: 2251644049610514387} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1817286248328936683 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 142410944142034183} + m_CullTransparentMesh: 1 +--- !u!114 &5062998508548426256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 142410944142034183} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: CLOSE +--- !u!1 &148537182132702902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4572689466769601760} + - component: {fileID: 4154219315731036489} + - component: {fileID: 4463598794074705886} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4572689466769601760 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 148537182132702902} + 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: 3214842484884173001} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4154219315731036489 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 148537182132702902} + m_CullTransparentMesh: 1 +--- !u!114 &4463598794074705886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 148537182132702902} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: OPEN (Respondent) +--- !u!1 &239316264806458096 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8848471920763975892} + - component: {fileID: -4233910426058266886} + m_Layer: 0 + m_Name: MockLauncher + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8848471920763975892 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239316264806458096} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1034.803, y: 570.05005, z: -3.5055723} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1376103951402372793} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-4233910426058266886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239316264806458096} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7cd08f9a41825e44382f1b5f2259539d, type: 3} + m_Name: + m_EditorClassIdentifier: + tradingService: {fileID: 0} + mockSession: + sessionID: 9878181 + initiator: + userID: 910d7b89-99c4-468c-8e14-578a8144892c + nickname: Rado + playerAvatarType: 1 + equippedCosmetic: 1 + tradeableItems: + hats: 00000000010000000200000003000000 + responder: + userID: cloned-user-id-0003 + nickname: Darryn + playerAvatarType: 2 + equippedCosmetic: 0 + tradeableItems: + hats: 03000000070000000400000000000000 + mockOffer: + initiatorGives: 2 + initiatorReceives: 7 + finalOffer: 0 + target: 0 + view: {fileID: 0} +--- !u!1 &3477650912847723043 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3108182969798717469} + - component: {fileID: 6622064725676031349} + m_Layer: 5 + m_Name: Buttons + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3108182969798717469 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3477650912847723043} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7791550092258612899} + - {fileID: 3214842484884173001} + - {fileID: 2251644049610514387} + m_Father: {fileID: 1376103951402372793} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -30, y: -30} + m_SizeDelta: {x: 155.16, y: 300} + m_Pivot: {x: 1, y: 1} +--- !u!114 &6622064725676031349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3477650912847723043} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &3676491278140821198 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2251644049610514387} + - component: {fileID: 5086831747083708710} + - component: {fileID: 3554400078827098996} + - component: {fileID: 3348106179009381285} + m_Layer: 5 + m_Name: Button (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2251644049610514387 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3676491278140821198} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5854170000784374064} + m_Father: {fileID: 3108182969798717469} + m_RootOrder: 2 + 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: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5086831747083708710 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3676491278140821198} + m_CullTransparentMesh: 1 +--- !u!114 &3554400078827098996 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3676491278140821198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &3348106179009381285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3676491278140821198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3554400078827098996} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -4233910426058266886} + m_TargetAssemblyTypeName: MockLauncher, Assembly-CSharp + m_MethodName: OnBtnClose + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &5105625842688876945 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1376103951402372793} + - component: {fileID: 3282619856964440983} + - component: {fileID: 9220156311334413905} + - component: {fileID: 5967575307592825145} + m_Layer: 5 + m_Name: DebugCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1376103951402372793 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5105625842688876945} + 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: 3108182969798717469} + m_Father: {fileID: 8848471920763975892} + m_RootOrder: 0 + 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!223 &3282619856964440983 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5105625842688876945} + 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_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 11 + m_TargetDisplay: 0 +--- !u!114 &9220156311334413905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5105625842688876945} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1600, y: 900} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &5967575307592825145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5105625842688876945} + 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: 4294967295 +--- !u!1 &5343469460694856071 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3214842484884173001} + - component: {fileID: 8394929000003850540} + - component: {fileID: 4058253579110757211} + - component: {fileID: 2131120257273279418} + m_Layer: 5 + m_Name: Button (Legacy) (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3214842484884173001 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5343469460694856071} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4572689466769601760} + m_Father: {fileID: 3108182969798717469} + m_RootOrder: 1 + 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: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8394929000003850540 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5343469460694856071} + m_CullTransparentMesh: 1 +--- !u!114 &4058253579110757211 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5343469460694856071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &2131120257273279418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5343469460694856071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4058253579110757211} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -4233910426058266886} + m_TargetAssemblyTypeName: MockLauncher, Assembly-CSharp + m_MethodName: OnBtnOpenRespondent + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &6725422102721636842 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7791550092258612899} + - component: {fileID: 8998591619458829033} + - component: {fileID: 6435236943917285859} + - component: {fileID: 4676132981027228956} + m_Layer: 5 + m_Name: Button (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7791550092258612899 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6725422102721636842} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9077598550550498375} + m_Father: {fileID: 3108182969798717469} + m_RootOrder: 0 + 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: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8998591619458829033 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6725422102721636842} + m_CullTransparentMesh: 1 +--- !u!114 &6435236943917285859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6725422102721636842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4676132981027228956 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6725422102721636842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6435236943917285859} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -4233910426058266886} + m_TargetAssemblyTypeName: MockLauncher, Assembly-CSharp + m_MethodName: OnBtnOpenInitiator + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &7318701638079275797 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9077598550550498375} + - component: {fileID: 3807227062127190291} + - component: {fileID: 4958775050826136715} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9077598550550498375 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7318701638079275797} + 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: 7791550092258612899} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3807227062127190291 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7318701638079275797} + m_CullTransparentMesh: 1 +--- !u!114 &4958775050826136715 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7318701638079275797} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: OPEN (initiator) diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab.meta new file mode 100644 index 0000000..eb32953 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/MockLauncher.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 43c5229875ca02d4e85782aadfa4c0ba +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab new file mode 100644 index 0000000..d508027 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab @@ -0,0 +1,485 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &869162322 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 869162323} + - component: {fileID: 869162326} + - component: {fileID: 869162325} + - component: {fileID: 869162324} + m_Layer: 5 + m_Name: Button (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &869162323 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 869162322} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2043911740} + m_Father: {fileID: 6817762774480101311} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 355.31003} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &869162326 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 869162322} + m_CullTransparentMesh: 1 +--- !u!114 &869162325 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 869162322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &869162324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 869162322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 869162325} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8724934366708842103} + m_TargetAssemblyTypeName: PubNubUnityShowcase.TradingService, Assembly-CSharp + m_MethodName: DisconnectTrading + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &2043911739 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2043911740} + - component: {fileID: 2043911742} + - component: {fileID: 2043911741} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2043911740 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2043911739} + 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: 869162323} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2043911742 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2043911739} + m_CullTransparentMesh: 1 +--- !u!114 &2043911741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2043911739} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: DisconnectTrading +--- !u!1 &67750474539870321 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4270148161291114721} + - component: {fileID: 7019708777681234956} + - component: {fileID: 6333615499533288432} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4270148161291114721 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67750474539870321} + 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: 6817762774480101311} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 399.99997} + m_SizeDelta: {x: 1499.9999, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7019708777681234956 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67750474539870321} + m_CullTransparentMesh: 1 +--- !u!114 &6333615499533288432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67750474539870321} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '{console_message}' +--- !u!1 &5790214810174893690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6817762774480101311} + m_Layer: 5 + m_Name: debug + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6817762774480101311 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5790214810174893690} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 869162323} + - {fileID: 4270148161291114721} + m_Father: {fileID: 8724934364886597124} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &8724934364886597120 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8724934364886597124} + - component: {fileID: 8724934364886597125} + - component: {fileID: 8724934364886597122} + - component: {fileID: 8724934364886597123} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8724934364886597124 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934364886597120} + 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: 6817762774480101311} + m_Father: {fileID: 8724934366708842102} + m_RootOrder: 0 + 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!223 &8724934364886597125 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934364886597120} + 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_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 10 + m_TargetDisplay: 0 +--- !u!114 &8724934364886597122 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934364886597120} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1600, y: 900} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &8724934364886597123 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934364886597120} + 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: 4294967295 +--- !u!1 &8724934366708842100 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8724934366708842102} + - component: {fileID: 8724934366708842103} + m_Layer: 0 + m_Name: TradingService + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8724934366708842102 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934366708842100} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 671.6502, y: 372.05768, z: 23.757406} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8724934364886597124} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8724934366708842103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8724934366708842100} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36bc852c381bb4d47868fb9366600439, type: 3} + m_Name: + m_EditorClassIdentifier: + canvas: {fileID: 8724934364886597125} + assets: {fileID: 11400000, guid: 60ab39eaf186f4a4a82a5e7f6916b88f, type: 2} + tradingViewPrefab: {fileID: 1805628761880506673, guid: c2ec486481ddb884d8bcf9d1908e07e3, + type: 3} + debugText: {fileID: 6333615499533288432} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab.meta new file mode 100644 index 0000000..e55f61e --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/TradingService.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3fe49984b4df8c946a37a4ff9460844c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab new file mode 100644 index 0000000..79797c0 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab @@ -0,0 +1,220 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5602563537271705970 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5682262823154897400} + - component: {fileID: 5679322574932928078} + - component: {fileID: 5499385800079573352} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5682262823154897400 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5602563537271705970} + 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: 5682040107528463386} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5679322574932928078 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5602563537271705970} + m_CullTransparentMesh: 0 +--- !u!114 &5499385800079573352 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5602563537271705970} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 1 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '{BTN_label}' +--- !u!1 &5603181766722192756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5682040107528463386} + - component: {fileID: 5679456392419468736} + - component: {fileID: 5499890319806145448} + - component: {fileID: 5499101510830965190} + - component: {fileID: 3050857001032907540} + m_Layer: 5 + m_Name: btn-action + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5682040107528463386 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5603181766722192756} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5682262823154897400} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 86.95, y: -41.6} + m_SizeDelta: {x: 173.9, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5679456392419468736 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5603181766722192756} + m_CullTransparentMesh: 0 +--- !u!114 &5499890319806145448 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5603181766722192756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b4fde96d89322ff4dafe3d20e376522c, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &5499101510830965190 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5603181766722192756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.51125765, g: 1, b: 0.41911763, a: 1} + m_HighlightedColor: {r: 0.07586217, g: 1, b: 0, a: 1} + m_PressedColor: {r: 0.071551725, g: 0.6102941, b: 0, a: 1} + m_SelectedColor: {r: 0.07586217, g: 1, b: 0, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: 7e667b83f72b1c84daf397b10633e352, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 6caa0f35ab4f7c2419be299e6763413e, type: 3} + m_SelectedSprite: {fileID: 21300000, guid: 7e667b83f72b1c84daf397b10633e352, type: 3} + m_DisabledSprite: {fileID: 21300000, guid: 3939d038d6130a149bafcb32aa894989, type: 3} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5499890319806145448} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &3050857001032907540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5603181766722192756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aa5984ca6f363ab4791655dd355d258e, type: 3} + m_Name: + m_EditorClassIdentifier: + button: {fileID: 5499101510830965190} + labelText: {fileID: 5499385800079573352} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab.meta new file mode 100644 index 0000000..be49af0 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-action.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9e3bb1d838eae9544b0c43d5208b21e0 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab new file mode 100644 index 0000000..3260013 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab @@ -0,0 +1,329 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3821126373750599270 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6965075225983523840} + - component: {fileID: 7967998919971263196} + m_Layer: 5 + m_Name: btn-inventorySlot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6965075225983523840 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3821126373750599270} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8040769473278118664} + - {fileID: 8555548223235979444} + - {fileID: 5489051761412699660} + m_Father: {fileID: 0} + m_RootOrder: 0 + 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: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7967998919971263196 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3821126373750599270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0608fd8850e57db4a85c626602dd3ef0, type: 3} + m_Name: + m_EditorClassIdentifier: + contentImage: {fileID: 8726118302531440659} + button: {fileID: 250110024997335757} +--- !u!1 &5588735225479844552 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8555548223235979444} + - component: {fileID: 1470211993830021202} + - component: {fileID: 8726118302531440659} + m_Layer: 5 + m_Name: content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8555548223235979444 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5588735225479844552} + 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: 6965075225983523840} + m_RootOrder: 1 + 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: 45, y: 45} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1470211993830021202 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5588735225479844552} + m_CullTransparentMesh: 1 +--- !u!114 &8726118302531440659 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5588735225479844552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: c4b68ad189434b045ba66f7f50f1c464, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6477445452950622258 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5489051761412699660} + - component: {fileID: 250110024997335757} + - component: {fileID: 8602227143633573365} + - component: {fileID: 7127096361772346025} + m_Layer: 5 + m_Name: btn-slot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5489051761412699660 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6477445452950622258} + 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: 6965075225983523840} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &250110024997335757 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6477445452950622258} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 7127096361772346025} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!222 &8602227143633573365 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6477445452950622258} + m_CullTransparentMesh: 1 +--- !u!114 &7127096361772346025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6477445452950622258} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 1, a: 0} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6655137420487843431 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8040769473278118664} + - component: {fileID: 3621707332012643708} + - component: {fileID: 3201272317765770551} + m_Layer: 5 + m_Name: background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8040769473278118664 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6655137420487843431} + 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: 6965075225983523840} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3621707332012643708 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6655137420487843431} + m_CullTransparentMesh: 1 +--- !u!114 &3201272317765770551 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6655137420487843431} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: f82c8e87976c31a4583f5576fc905cff, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab.meta new file mode 100644 index 0000000..d3f40fe --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/btn-inventorySlot.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1d96c6c73bc301b41916bb89b28c08dc +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab new file mode 100644 index 0000000..b3f73a8 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab @@ -0,0 +1,86 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5388779958379505180 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5388779958379505179} + - component: {fileID: 5388779958379505178} + m_Layer: 0 + m_Name: hatVisual + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5388779958379505179 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5388779958379505180} + 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: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5388779958379505178 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5388779958379505180} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: bcaf6f9ea721bf44cbc81bf28e406e8e, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1.2, y: 1.2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab.meta new file mode 100644 index 0000000..6410052 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/hatVisual.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 17b5c67fd344c174488dea4dc6b7be81 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab new file mode 100644 index 0000000..0d737e5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab @@ -0,0 +1,118 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4364734764883793252 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6691884531295092258} + - component: {fileID: 5650892315023422927} + m_Layer: 5 + m_Name: root + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6691884531295092258 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4364734764883793252} + 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: 6825341663370429899} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5650892315023422927 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4364734764883793252} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 7 + m_Spacing: 4 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &7083559458504992033 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6825341663370429899} + - component: {fileID: 3412944923638377489} + m_Layer: 5 + m_Name: panel-actionButtons + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6825341663370429899 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7083559458504992033} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6691884531295092258} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 173.9, y: 200} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &3412944923638377489 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7083559458504992033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d709a521e87d46c40901a911be1f5305, type: 3} + m_Name: + m_EditorClassIdentifier: + buttonPrefab: {fileID: 3050857001032907540, guid: 9e3bb1d838eae9544b0c43d5208b21e0, + type: 3} + root: {fileID: 6691884531295092258} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab.meta new file mode 100644 index 0000000..385b0a1 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-actionButtons.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 37a19c24485767a4ea1accbbeb01bab0 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab new file mode 100644 index 0000000..eb13ff1 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab @@ -0,0 +1,853 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &133179809005472927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8844968447220105635} + - component: {fileID: 5655656593843911072} + m_Layer: 5 + m_Name: canvas-viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8844968447220105635 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 133179809005472927} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5218372660938559404} + - {fileID: 1821218954103383723} + - {fileID: 5646556239107631640} + m_Father: {fileID: 1615543720160875105} + m_RootOrder: 1 + 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: 153.2, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &5655656593843911072 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 133179809005472927} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &401492678305004244 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5048807344690428839} + - component: {fileID: 3006353922416948623} + - component: {fileID: 1094039491814123422} + m_Layer: 5 + m_Name: img-hat + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5048807344690428839 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 401492678305004244} + 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: 6775178626935444484} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 58.549988} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3006353922416948623 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 401492678305004244} + m_CullTransparentMesh: 1 +--- !u!114 &1094039491814123422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 401492678305004244} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: c4b68ad189434b045ba66f7f50f1c464, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &430459780603181037 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5218372660938559404} + - component: {fileID: 2515754896476283797} + - component: {fileID: 8266796903648970779} + m_Layer: 5 + m_Name: background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5218372660938559404 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 430459780603181037} + 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: 8844968447220105635} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2515754896476283797 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 430459780603181037} + m_CullTransparentMesh: 1 +--- !u!114 &8266796903648970779 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 430459780603181037} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8113208, g: 0.8113208, b: 0.8113208, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b03ab643c81e7284a9b92912a84735b3, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1889338178219754060 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1821218954103383723} + m_Layer: 5 + m_Name: avatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1821218954103383723 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1889338178219754060} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4963574856585739932} + - {fileID: 2088742051037806266} + - {fileID: 6775178626935444484} + m_Father: {fileID: 8844968447220105635} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 20} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0} +--- !u!1 &2159474932264417603 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2088742051037806266} + - component: {fileID: 2656816111886275181} + - component: {fileID: 8624790744454323793} + m_Layer: 5 + m_Name: img-LegR + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2088742051037806266 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2159474932264417603} + 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: 1821218954103383723} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &2656816111886275181 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2159474932264417603} + m_CullTransparentMesh: 1 +--- !u!114 &8624790744454323793 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2159474932264417603} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 663e366953e183f4fa76651f145ca0fc, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3095582265165037280 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4963574856585739932} + - component: {fileID: 2996525443165338095} + - component: {fileID: 9058409590787817523} + m_Layer: 5 + m_Name: img-LegL + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4963574856585739932 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3095582265165037280} + 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: 1821218954103383723} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &2996525443165338095 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3095582265165037280} + m_CullTransparentMesh: 1 +--- !u!114 &9058409590787817523 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3095582265165037280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 9c7ce6f80b14c58489589d54ce646b12, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3214331085401525641 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6775178626935444484} + - component: {fileID: 4331935910364514777} + - component: {fileID: 4911941284424213491} + m_Layer: 5 + m_Name: img-body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6775178626935444484 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3214331085401525641} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5048807344690428839} + m_Father: {fileID: 1821218954103383723} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 102.9} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &4331935910364514777 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3214331085401525641} + m_CullTransparentMesh: 1 +--- !u!114 &4911941284424213491 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3214331085401525641} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8d3e39403b851af4197e9d4cca9bcffd, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4484952866343011125 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5646556239107631640} + - component: {fileID: 1847562999896746241} + - component: {fileID: 3478061624199088906} + m_Layer: 5 + m_Name: txt-nickname + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5646556239107631640 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4484952866343011125} + 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: 8844968447220105635} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 158.5, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1847562999896746241 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4484952866343011125} + m_CullTransparentMesh: 1 +--- !u!114 &3478061624199088906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4484952866343011125} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 1 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '{superlong_nickname}' +--- !u!1 &4968378400144132584 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4927514983195895211} + - component: {fileID: 8136657318297213769} + m_Layer: 5 + m_Name: inventory + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4927514983195895211 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4968378400144132584} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 133035940229194513} + m_Father: {fileID: 1615543720160875105} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 215, y: 105} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &8136657318297213769 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4968378400144132584} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 136b0d7ce0d8b1b4f922c823e6a5549c, type: 3} + m_Name: + m_EditorClassIdentifier: + gridRoot: {fileID: 133035940229194513} + slotPrefab: {fileID: 7967998919971263196, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + panelGroup: {fileID: 0} +--- !u!1 &5681637582938309992 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 133035940229194513} + - component: {fileID: 7498217022995365308} + - component: {fileID: 9150588531666045591} + - component: {fileID: 7319062210834877631} + m_Layer: 5 + m_Name: grid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &133035940229194513 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5681637582938309992} + 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: 4927514983195895211} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0.0000076293945, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7498217022995365308 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5681637582938309992} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 22 + m_Right: 22 + m_Top: 22 + m_Bottom: 22 + m_ChildAlignment: 4 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 50, y: 50} + m_Spacing: {x: 5, y: 5} + m_Constraint: 1 + m_ConstraintCount: 4 +--- !u!222 &9150588531666045591 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5681637582938309992} + m_CullTransparentMesh: 1 +--- !u!114 &7319062210834877631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5681637582938309992} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0.9424448, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7759228738256785048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1615543720160875105} + - component: {fileID: 1344296460905487888} + m_Layer: 5 + m_Name: panel-avatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1615543720160875105 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7759228738256785048} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3529863526821217836} + - {fileID: 8844968447220105635} + - {fileID: 4927514983195895211} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 30, y: -50} + m_SizeDelta: {x: 150, y: 200} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1344296460905487888 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7759228738256785048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ac6f9398367b924bad546f2e5f560ba, type: 3} + m_Name: + m_EditorClassIdentifier: + bodyImage: {fileID: 4911941284424213491} + hatImage: {fileID: 1094039491814123422} + nicknameText: {fileID: 3478061624199088906} +--- !u!1 &8333686178970623809 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3529863526821217836} + - component: {fileID: 7563710673722878786} + - component: {fileID: 463957160955500798} + m_Layer: 5 + m_Name: user + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3529863526821217836 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8333686178970623809} + 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: 1615543720160875105} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7563710673722878786 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8333686178970623809} + m_CullTransparentMesh: 1 +--- !u!114 &463957160955500798 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8333686178970623809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 23 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Rado diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab.meta new file mode 100644 index 0000000..cdc8c2a --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-avatar.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e44421013a7bd74b91771ef4e8ce816 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab new file mode 100644 index 0000000..3fd887f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab @@ -0,0 +1,212 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4816977375595765380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7084009316718411629} + - component: {fileID: 6978721272760144714} + - component: {fileID: 6103763680195034960} + - component: {fileID: 7151951379135520857} + - component: {fileID: 4540885053595535870} + m_Layer: 5 + m_Name: panel-inventory + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7084009316718411629 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816977375595765380} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9096455412840059168} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 30, y: 30} + m_SizeDelta: {x: 200, y: 105} + m_Pivot: {x: 0, y: 0} +--- !u!114 &6978721272760144714 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816977375595765380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 136b0d7ce0d8b1b4f922c823e6a5549c, type: 3} + m_Name: + m_EditorClassIdentifier: + gridRoot: {fileID: 9096455412840059168} + slotPrefab: {fileID: 7967998919971263196, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + panelGroup: {fileID: 4540885053595535870} + mock_data: + hats: 0100000002000000040000000200000002000000 +--- !u!222 &6103763680195034960 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816977375595765380} + m_CullTransparentMesh: 1 +--- !u!114 &7151951379135520857 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816977375595765380} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!225 &4540885053595535870 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816977375595765380} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &8941917525155915403 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9096455412840059168} + - component: {fileID: 3859372704768288812} + - component: {fileID: 5857783159024721673} + - component: {fileID: 3812835182142681778} + m_Layer: 5 + m_Name: grid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9096455412840059168 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941917525155915403} + 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: 7084009316718411629} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3859372704768288812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941917525155915403} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 22 + m_Right: 22 + m_Top: 22 + m_Bottom: 22 + m_ChildAlignment: 4 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 50, y: 50} + m_Spacing: {x: 5, y: 5} + m_Constraint: 1 + m_ConstraintCount: 4 +--- !u!222 &5857783159024721673 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941917525155915403} + m_CullTransparentMesh: 1 +--- !u!114 &3812835182142681778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941917525155915403} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0.9424448, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab.meta new file mode 100644 index 0000000..8efaf0b --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-inventory.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5d3d61e862c5fca43bc2f8a683ca27fd +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab new file mode 100644 index 0000000..f248850 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab @@ -0,0 +1,841 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &610152651807769844 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6442565701453933218} + - component: {fileID: 6764168019831595694} + - component: {fileID: 3395231940854000305} + m_Layer: 5 + m_Name: root-responder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6442565701453933218 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 610152651807769844} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 231197683303971956} + - {fileID: 9163821955028496238} + m_Father: {fileID: 7423939063969190348} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -10, y: 10} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 1, y: 0} +--- !u!222 &6764168019831595694 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 610152651807769844} + m_CullTransparentMesh: 1 +--- !u!114 &3395231940854000305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 610152651807769844} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.30588236} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1834230025500740423 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1469025598749648588} + - component: {fileID: 671213687531723476} + - component: {fileID: 7596988059475278916} + m_Layer: 5 + m_Name: txt-status + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1469025598749648588 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1834230025500740423} + 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: 7423939063969190348} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 45} + m_SizeDelta: {x: 600, y: 40} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &671213687531723476 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1834230025500740423} + m_CullTransparentMesh: 1 +--- !u!114 &7596988059475278916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1834230025500740423} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8117648, g: 0.7254902, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 230 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '{superlong textstatus}' +--- !u!1 &2871718963509926108 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6526594420647171651} + - component: {fileID: 4787368203612965906} + - component: {fileID: 7367788377560326920} + m_Layer: 5 + m_Name: root-initiator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6526594420647171651 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2871718963509926108} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9182447820799262961} + - {fileID: 2226147828093962850} + m_Father: {fileID: 7423939063969190348} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -30} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!222 &4787368203612965906 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2871718963509926108} + m_CullTransparentMesh: 1 +--- !u!114 &7367788377560326920 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2871718963509926108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.30588236} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3350408370887245040 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7423939063969190348} + - component: {fileID: 2377838666131970872} + - component: {fileID: 1113304136958295845} + - component: {fileID: 3220983481723013418} + m_Layer: 5 + m_Name: panel-offer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7423939063969190348 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3350408370887245040} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4569960175979367324} + - {fileID: 1469025598749648588} + - {fileID: 6526594420647171651} + - {fileID: 6442565701453933218} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 300, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2377838666131970872 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3350408370887245040} + m_CullTransparentMesh: 1 +--- !u!114 &1113304136958295845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3350408370887245040} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 007ba2dcd05b8cc4e812365d744fc549, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &3220983481723013418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3350408370887245040} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6573589462130074bb98a14584408b35, type: 3} + m_Name: + m_EditorClassIdentifier: + initiatorSlot: {fileID: 1213775528042300606} + responderSlot: {fileID: 939439088785928872} + labelText: {fileID: 8259932267432507384} + sessionStatusText: {fileID: 7596988059475278916} +--- !u!1 &4825972794139396185 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4569960175979367324} + - component: {fileID: 1480434543053281928} + - component: {fileID: 8259932267432507384} + m_Layer: 5 + m_Name: txt-offer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4569960175979367324 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4825972794139396185} + 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: 7423939063969190348} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -10} + m_SizeDelta: {x: 200, y: 25} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1480434543053281928 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4825972794139396185} + m_CullTransparentMesh: 1 +--- !u!114 &8259932267432507384 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4825972794139396185} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 6eeb36072a0153d48adb93deb4708cdf, type: 3} + m_FontSize: 15 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: offer +--- !u!1 &5457291001427572333 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9163821955028496238} + - component: {fileID: 5887726268183681313} + - component: {fileID: 5757268208449638454} + m_Layer: 5 + m_Name: arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9163821955028496238 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5457291001427572333} + 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: 6442565701453933218} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -55, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 1, y: 0.5} +--- !u!222 &5887726268183681313 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5457291001427572333} + m_CullTransparentMesh: 1 +--- !u!114 &5757268208449638454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5457291001427572333} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8c886ae311dc0a34689e2347a4cce37d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7762582703067131008 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9182447820799262961} + - component: {fileID: 3485054143547543516} + - component: {fileID: 563168671393696467} + m_Layer: 5 + m_Name: arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9182447820799262961 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7762582703067131008} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6526594420647171651} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 1, y: 0.5} +--- !u!222 &3485054143547543516 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7762582703067131008} + m_CullTransparentMesh: 1 +--- !u!114 &563168671393696467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7762582703067131008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8c886ae311dc0a34689e2347a4cce37d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1001 &7178045193640665204 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 6442565701453933218} + m_Modifications: + - target: {fileID: 3821126373750599270, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Name + value: btn-inventorySlot + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1d96c6c73bc301b41916bb89b28c08dc, type: 3} +--- !u!224 &231197683303971956 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + m_PrefabInstance: {fileID: 7178045193640665204} + m_PrefabAsset: {fileID: 0} +--- !u!114 &939439088785928872 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7967998919971263196, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + m_PrefabInstance: {fileID: 7178045193640665204} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0608fd8850e57db4a85c626602dd3ef0, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &9100709026514294370 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 6526594420647171651} + m_Modifications: + - target: {fileID: 3821126373750599270, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Name + value: btn-inventorySlot + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1d96c6c73bc301b41916bb89b28c08dc, type: 3} +--- !u!114 &1213775528042300606 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7967998919971263196, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + m_PrefabInstance: {fileID: 9100709026514294370} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0608fd8850e57db4a85c626602dd3ef0, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &2226147828093962850 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6965075225983523840, guid: 1d96c6c73bc301b41916bb89b28c08dc, + type: 3} + m_PrefabInstance: {fileID: 9100709026514294370} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab.meta new file mode 100644 index 0000000..e5290ce --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/panel-offer.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e146884bb3fe8a14c9ba280358e6b69c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab new file mode 100644 index 0000000..7450606 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab @@ -0,0 +1,1157 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &545822962303640263 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3022502386551415907} + m_Layer: 5 + m_Name: offerRoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3022502386551415907 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 545822962303640263} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7613007257957271920} + m_Father: {fileID: 4102849422802249725} + m_RootOrder: 4 + 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: 87} + m_SizeDelta: {x: 200, y: 120} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &2700394024618941492 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3029625379902068453} + - component: {fileID: 1963001417222243343} + - component: {fileID: 5470074742165713821} + m_Layer: 5 + m_Name: background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3029625379902068453 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2700394024618941492} + 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: 8307117269534539052} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1963001417222243343 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2700394024618941492} + m_CullTransparentMesh: 1 +--- !u!114 &5470074742165713821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2700394024618941492} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.6745098} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6423586144601457261 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4102849422802249725} + - component: {fileID: 1156783189395292389} + - component: {fileID: 5524224468208830743} + m_Layer: 5 + m_Name: mainPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4102849422802249725 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6423586144601457261} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2609359307014100608} + - {fileID: 1093277805583829171} + - {fileID: 1341963220629853654} + - {fileID: 5860115370504038674} + - {fileID: 3022502386551415907} + - {fileID: 1574958891791103254} + - {fileID: 2803323075005709797} + m_Father: {fileID: 8307117269534539052} + m_RootOrder: 1 + 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: 6.1} + m_SizeDelta: {x: 700.5, y: 435} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1156783189395292389 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6423586144601457261} + m_CullTransparentMesh: 1 +--- !u!114 &5524224468208830743 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6423586144601457261} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b03ab643c81e7284a9b92912a84735b3, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6911953672120103299 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1574958891791103254} + - component: {fileID: 4563977971508141896} + - component: {fileID: 1962031307426921584} + m_Layer: 5 + m_Name: counter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1574958891791103254 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6911953672120103299} + 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: 4102849422802249725} + m_RootOrder: 5 + 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: 70, y: 70} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4563977971508141896 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6911953672120103299} + m_CullTransparentMesh: 1 +--- !u!114 &1962031307426921584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6911953672120103299} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 33 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 49 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 88 +--- !u!1 &9084951693765129559 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8307117269534539052} + - component: {fileID: 1805628761880506673} + m_Layer: 5 + m_Name: view-Trading + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8307117269534539052 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9084951693765129559} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3029625379902068453} + - {fileID: 4102849422802249725} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1805628761880506673 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9084951693765129559} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5dbedd8154c39154c9c79635c21a419c, type: 3} + m_Name: + m_EditorClassIdentifier: + offerPanel: {fileID: 2455252979461411222} + actionButtons: {fileID: 6269622267948340287} + initiatorAvatar: {fileID: 2376273878209272561} + initiatorInventory: {fileID: 989112595061335188} + respondentAvatar: {fileID: 1608887353635723687} + respondentInventory: {fileID: 6036333218530673973} +--- !u!1001 &356923483332364215 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102849422802249725} + m_Modifications: + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_SizeDelta.x + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_SizeDelta.y + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 474.20004 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 169.20001 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7759228738256785048, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Name + value: panel-avatar + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8e44421013a7bd74b91771ef4e8ce816, type: 3} +--- !u!224 &1341963220629853654 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + m_PrefabInstance: {fileID: 356923483332364215} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1608887353635723687 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1344296460905487888, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + m_PrefabInstance: {fileID: 356923483332364215} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ac6f9398367b924bad546f2e5f560ba, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1054393145397352636 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 3022502386551415907} + m_Modifications: + - target: {fileID: 3350408370887245040, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_Name + value: panel-offer + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_SizeDelta.x + value: 240.4 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_SizeDelta.y + value: 121.3 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e146884bb3fe8a14c9ba280358e6b69c, type: 3} +--- !u!114 &2455252979461411222 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3220983481723013418, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + m_PrefabInstance: {fileID: 1054393145397352636} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6573589462130074bb98a14584408b35, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &7613007257957271920 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7423939063969190348, guid: e146884bb3fe8a14c9ba280358e6b69c, + type: 3} + m_PrefabInstance: {fileID: 1054393145397352636} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &3629300978368513249 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102849422802249725} + m_Modifications: + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_SizeDelta.x + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_SizeDelta.y + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 169.2 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7759228738256785048, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + propertyPath: m_Name + value: panel-avatar + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8e44421013a7bd74b91771ef4e8ce816, type: 3} +--- !u!114 &2376273878209272561 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1344296460905487888, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + m_PrefabInstance: {fileID: 3629300978368513249} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ac6f9398367b924bad546f2e5f560ba, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &2609359307014100608 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1615543720160875105, guid: 8e44421013a7bd74b91771ef4e8ce816, + type: 3} + m_PrefabInstance: {fileID: 3629300978368513249} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &3682883540644386431 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102849422802249725} + m_Modifications: + - target: {fileID: 4816977375595765380, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Name + value: panel-inventory + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_SizeDelta.x + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_SizeDelta.y + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -30 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, type: 3} +--- !u!224 &5860115370504038674 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + m_PrefabInstance: {fileID: 3682883540644386431} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6036333218530673973 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6978721272760144714, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + m_PrefabInstance: {fileID: 3682883540644386431} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 136b0d7ce0d8b1b4f922c823e6a5549c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &7882265474856810462 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102849422802249725} + m_Modifications: + - target: {fileID: 4816977375595765380, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Name + value: panel-inventory + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_SizeDelta.x + value: 200 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_SizeDelta.y + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, type: 3} +--- !u!114 &989112595061335188 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6978721272760144714, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + m_PrefabInstance: {fileID: 7882265474856810462} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 136b0d7ce0d8b1b4f922c823e6a5549c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &1093277805583829171 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7084009316718411629, guid: 5d3d61e862c5fca43bc2f8a683ca27fd, + type: 3} + m_PrefabInstance: {fileID: 7882265474856810462} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &8673681572228020270 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102849422802249725} + m_Modifications: + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_SizeDelta.y + value: 150 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7083559458504992033, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + propertyPath: m_Name + value: panel-actionButtons + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 37a19c24485767a4ea1accbbeb01bab0, type: 3} +--- !u!224 &2803323075005709797 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6825341663370429899, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + m_PrefabInstance: {fileID: 8673681572228020270} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6269622267948340287 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3412944923638377489, guid: 37a19c24485767a4ea1accbbeb01bab0, + type: 3} + m_PrefabInstance: {fileID: 8673681572228020270} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d709a521e87d46c40901a911be1f5305, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab.meta new file mode 100644 index 0000000..4503cb7 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Prefabs/view-Trading.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c2ec486481ddb884d8bcf9d1908e07e3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs new file mode 100644 index 0000000..fd05795 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs @@ -0,0 +1,335 @@ +using Newtonsoft.Json; +using PubnubApi; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; +using Visyde; + +namespace PubNubUnityShowcase +{ + /// + /// Requests and listeners (PubNubAPI) + /// + public class PubNubTrading : IDisposable + { + public static string TradingPreffix => "trading"; //Trading channel prefix + private Pubnub pubnub { get { return PNManager.pubnubInstance.pubnub; } } + public PubNubTrading() + { + PNManager.pubnubInstance.onPubNubMessage += OnPnMessage; + PNManager.pubnubInstance.onPubNubPresence += OnPnPresence; + PNManager.pubnubInstance.onPubNubObject += OnPnObject; + PNManager.pubnubInstance.onPubNubStatus += OnPnStatus; + } + + private UserId ThisUser => pubnub.GetCurrentUserId(); + private Dictionary DatastoreUserMetadata => PNManager.pubnubInstance.CachedPlayers; + private string DebugTag => $"[Network]"; + + public event Action ReceivedOffer; + public event Action ReceivedInvite; + public event Action ReceivedInviteResponse; + public event Action ParticipantGoodbye; //If left with explicid SendLeaveMessage() + public event Action CommanReceived; + public event Action SessionPresenceChanged; //uuid, event + + #region PubNub Requests + public async Task SendTradeInviteAsync(TradeInvite invite) + { + var respInbox = GetInbox(invite.SessionData.Respondent.UserID); + + await pubnub.Publish() + .Message(invite) + .Channel(respInbox) + .Meta(MessageNormalilzation.GetMeta()) + .ShouldStore(true) + .ExecuteAsync(); + } + + public async Task SendInviteResponse(TradeInvite invite, InviteResponseData response) + { + await pubnub.Publish() + .Message(response) + .Channel(invite.RSVPChannel) + .Meta(MessageNormalilzation.GetMeta()) + .ShouldStore(true) + .ExecuteAsync(); + } + + public async Task SendOffer(TradeSessionData session, OfferData offer) + { + await pubnub.Publish() + .Message(offer) + .Channel(session.Channel) + .Meta(MessageNormalilzation.GetMeta()) + .ShouldStore(true) + .ExecuteAsync(); + + return offer; + } + + public async Task SendLeaveMessage(TradeSessionData session, LeaveSessionData leaveData) + { + await pubnub.Publish() + .Message(leaveData) + .Channel(session.Channel) + .Meta(MessageNormalilzation.GetMeta()) + .ShouldStore(true) + .ExecuteAsync(); + } + + public async Task SendCommand(TradeSessionData session, string cmd) + { + await pubnub.Publish() + .Message(cmd) + .Channel(session.Channel) + .Meta(MessageNormalilzation.GetCommandMeta()) + .ShouldStore(true) + .ExecuteAsync(); + } + + public async Task SubscribeToTradeInvites() + { + try + { + pubnub.Subscribe() + .Channels(new[] { GetInbox(ThisUser) }) + .Execute(); + + await Task.Delay(100); + //Debug.Log($"{DebugTag} Subscribed ch={GetInbox(ThisUser)}"); + + return GetInbox(ThisUser); + } + catch (Exception e) { throw e; } + } + + public async Task UnubscribeToTradeInvites() + { + try + { + pubnub.Unsubscribe() + .Channels(new[] { GetInbox(ThisUser) }) + .Execute(); + + await Task.Delay(100); + //Debug.Log($"{DebugTag} Unsubscribed ch={GetInbox(ThisUser)}"); + } + catch (Exception e) { throw e; } + } + + public async Task SubscribeSession(TradeSessionData session) + { + pubnub.Subscribe() + .Channels(new[] { session.Channel }) + .WithPresence() + .Execute(); + + await Task.Delay(100); + } + + public async Task UnsubscribeSession(TradeSessionData session) + { + pubnub.Unsubscribe() + .Channels(new[] { session.Channel, $"{session.Channel}-pnpres" }) + .Execute(); + + await Task.Delay(100); + Debug.Log($"[Network] Session({session.Id}): unsubscribe ch={session.Channel}-pnpres"); + } + + public async Task GetTraderInventory(UserId user) + { + try + { + var response = await pubnub.GetUuidMetadata() + .Uuid(user) + .IncludeCustom(true) + .ExecuteAsync(); + + if (response == null) + throw new NullReferenceException(nameof(response)); + + TradeInventoryData traderData = new TradeInventoryData(MetadataNormalization.GetHats(response.Result.Custom)); + return traderData; + } + catch (Exception e) + { + Debug.Log($"{DebugTag} (GetInventory): FAILED! >>{e}"); + return TradeInventoryData.GetEmpty(); + } + finally + { + Debug.Log($"{DebugTag} (GetInventory): user={user}"); + } + } + + public async Task ApplyMetadata(TradeSessionData session, OfferData offer) + { + try + { + DatastoreUserMetadata.TryGetValue(session.Initiator.UserID, out var initiatorCurrent); + DatastoreUserMetadata.TryGetValue(session.Respondent.UserID, out var respondentCurrent); + MetadataNormalization.ReplaceHats(session.Initiator.UserID, initiatorCurrent.Custom, offer.InitiatorGives, offer.InitiatorReceives); + MetadataNormalization.ReplaceHats(session.Respondent.UserID, respondentCurrent.Custom, offer.InitiatorReceives, offer.InitiatorGives); + + await PNManager.pubnubInstance.UpdateUserMetadata(session.Initiator.UserID, initiatorCurrent.Name, PNManager.pubnubInstance.CachedPlayers[session.Initiator.UserID].Custom); + await PNManager.pubnubInstance.UpdateUserMetadata(session.Respondent.UserID, respondentCurrent.Name, PNManager.pubnubInstance.CachedPlayers[session.Respondent.UserID].Custom); + } + catch (Exception e) + { + throw e; + } + } + + #endregion + + #region PubNub EventHandlers + private void OnPnMessage(PNMessageResult result) + { + if (result == null) + return; + + //filter only trading messages + if (!result.Channel.StartsWith(TradingPreffix)) + return; + + string json = JsonConvert.SerializeObject(result.Message); + + if (result.UserMetadata != null && result.UserMetadata is Dictionary) + { + var meta = (Dictionary)result.UserMetadata; + string typeKey = meta[MessageNormalilzation.TYPE_KEY] as string; + + if (meta[MessageNormalilzation.TYPE_KEY].Equals(MessageNormalilzation.COMMAND_KEY)) + { + OnMsgPayloadCommand(result.Message.ToString()); + } + else + { + if (typeKey.Equals(nameof(TradeInvite))) + OnMsgPayloadTradeInvite(MessageNormalilzation.GetPayload(result.Message)); + + if (typeKey.Equals(nameof(OfferData))) + OnMsgPayloadOffer(MessageNormalilzation.GetPayload(result.Message)); + + if (typeKey.Equals(nameof(InviteResponseData))) + OnMsgPayloadInviteResponse(MessageNormalilzation.GetPayload(result.Message)); + + if (typeKey.Equals(nameof(LeaveSessionData))) + ParticipantGoodbye?.Invoke(MessageNormalilzation.GetPayload(result.Message)); + } + } + } + + private void OnPnPresence(PNPresenceEventResult result) + { + if (!result.Channel.StartsWith(TradingPreffix)) + return; + + //it is safe to assume that only the current session channel will receive presence events so no need to check the channel + SessionPresenceChanged?.Invoke(result.Uuid, result.Event); + } + + private void OnPnObject(PNObjectEventResult result) + { + Debug.Log($"{DebugTag} MetaUpdate event received: {result.Type}"); + } + + private void OnPnStatus(PNStatus status) + { + try + { + if (status != null) + { + if (status.Operation == PNOperationType.PNSubscribeOperation) + { + var allTrading = new List(); + foreach (var ch in status.AffectedChannels) + { + if (ch.StartsWith(TradingPreffix)) + allTrading.Add(ch); + OnStatusSubscribeAnyTrading(allTrading); + } + } + + if (status.Operation == PNOperationType.PNUnsubscribeOperation) + { + var allTrading = new List(); + foreach (var ch in status.AffectedChannels) + { + if (ch.StartsWith(TradingPreffix)) + allTrading.Add(ch); + OnStatusUnsubscribeAnyTrading(allTrading); + } + } + } + } + catch (Exception e) + { + + throw e; + } + //Debug.Log($"Status received: {status.Operation}"); + } + #endregion + + + private void OnStatusSubscribeAnyTrading(List channels) + { + foreach (var ch in channels) + { + Debug.Log($"{DebugTag} Subscribed ch={ch}"); + } + } + + private void OnStatusUnsubscribeAnyTrading(List channels) + { + foreach (var ch in channels) + { + Debug.Log($"{DebugTag} Unubscribed ch={ch}"); + } + } + + private void OnMsgPayloadTradeInvite(TradeInvite invite) + { + ReceivedInvite?.Invoke(invite); + } + + private void OnMsgPayloadOffer(OfferData offer) + { + ReceivedOffer?.Invoke(offer); + } + + private void OnMsgPayloadInviteResponse(InviteResponseData response) + { + ReceivedInviteResponse?.Invoke(response); + } + + private void OnMsgPayloadCommand(string str) + { + CommanReceived?.Invoke(str); + Debug.Log($"{DebugTag} Command received: <{str}>"); + } + + private static string GetInbox(UserId userId) + { + return $"{TradingPreffix}.{userId}"; + } + + public void Dispose() + { + ReceivedInvite = null; + ReceivedInviteResponse = null; + ReceivedOffer = null; + SessionPresenceChanged = null; + ParticipantGoodbye = null; + + PNManager.pubnubInstance.onPubNubMessage -= OnPnMessage; + PNManager.pubnubInstance.onPubNubPresence -= OnPnPresence; + PNManager.pubnubInstance.onPubNubObject -= OnPnObject; + PNManager.pubnubInstance.onPubNubStatus -= OnPnStatus; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs.meta new file mode 100644 index 0000000..6322161 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/PubNubTrading.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9ded6793004702d44964396d483458f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes.meta new file mode 100644 index 0000000..afdcf07 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a853ff9cc114d834f9b7cbaa14c20796 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity new file mode 100644 index 0000000..d1215c9 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity @@ -0,0 +1,492 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 1889170219} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &840178747 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 840178750} + - component: {fileID: 840178749} + - component: {fileID: 840178748} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &840178748 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 840178747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &840178749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 840178747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 0 + m_DragThreshold: 5 +--- !u!4 &840178750 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 840178747} + 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: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1082406253 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1082406257} + - component: {fileID: 1082406256} + - component: {fileID: 1082406255} + - component: {fileID: 1082406254} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1082406254 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 +--- !u!124 &1082406255 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 +--- !u!20 &1082406256 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.21568629, g: 0.2784314, b: 0.30980393, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 566 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1082406257 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082406253} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!850595691 &1889170219 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 4 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 +--- !u!1001 &8724934365616989401 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8724934365067876316, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934365067876316, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934365067876316, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934365067876316, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934365067876316, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366289392294, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366289392294, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366289392294, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366289392294, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366289392294, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366585938226, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366585938226, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366585938226, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366585938226, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366585938226, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842100, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_Name + value: MockLauncher + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalPosition.x + value: 671.6502 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalPosition.y + value: 372.05768 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalPosition.z + value: 23.757406 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8724934366708842102, guid: 3fe49984b4df8c946a37a4ff9460844c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3fe49984b4df8c946a37a4ff9460844c, type: 3} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity.meta new file mode 100644 index 0000000..52462b5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/Scenes/TestScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 75054effcc0435d438485f4364265a6c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects.meta new file mode 100644 index 0000000..969ac36 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96f805194312960489a1d61a1920f5d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs new file mode 100644 index 0000000..2f77522 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace PubNubUnityShowcase.ScriptableObjects +{ + /// + /// Library for cosmetic items + /// + [CreateAssetMenu(fileName = "lib-cometicItems-", menuName = "Assets/CosmeticItems Library")] + public class CosmeticsLibrary : ScriptableObject, + ICosmeticItemLibrary, + IAvatarLibrary + { + [SerializeField] private List items; + [SerializeField] private List avatars; + + public CosmeticItem GetCosmeticItem(int id) + { + return items.Find(s => s.ItemID == id); + } + + public AvatarGraphics GetAvatar(int id) + { + return avatars.Find(s => s.ItemID == id); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs.meta new file mode 100644 index 0000000..12dfac2 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/ScriptableObjects/CosmeticsLibrary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ec508bf28a7c9047a548371e4fe3db0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs new file mode 100644 index 0000000..e1da378 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs @@ -0,0 +1,10 @@ +namespace PubNubUnityShowcase +{ + /// + /// Trading session user state + /// + public struct SessionUserState : IJsonSerializable + { + + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs.meta new file mode 100644 index 0000000..f73e55a --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/SessionUserState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9d78121e9690f2147980e85429cee19e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs new file mode 100644 index 0000000..fa16abe --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct TradeInventoryData : IJsonSerializable + { + [SerializeField] private List hats; + + public TradeInventoryData(List cosmeticItems) + { + this.hats = cosmeticItems; + } + + public static TradeInventoryData GetEmpty() + { + return new TradeInventoryData(new List()); + } + + public List CosmeticItems { get => hats; set => hats = value; } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs.meta new file mode 100644 index 0000000..b781558 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInventoryData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6009a565376a52d46888d359f1c16131 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs new file mode 100644 index 0000000..cb68b57 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; + +namespace PubNubUnityShowcase +{ + public struct TradeInvite : IJsonSerializable + { + public TradeInvite(TradeSessionData sessionData, OfferData offerData) + { + SessionData = sessionData; + OfferData = offerData; + } + + [JsonProperty("session")] + public TradeSessionData SessionData { get; set; } + + [JsonProperty("offer")] + public OfferData OfferData { get; set; } + + /// + /// Channel to send invite resposnes + /// + [JsonIgnore] + public string RSVPChannel => $"{PubNubTrading.TradingPreffix}.{SessionData.Initiator.UserID}"; + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs.meta new file mode 100644 index 0000000..a4d1f00 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeInvite.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35d68dc62909ae147ae5203d981186c8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs new file mode 100644 index 0000000..e9207bd --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs @@ -0,0 +1,81 @@ +using Newtonsoft.Json; +using PubnubApi; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct TradeSessionData : IJsonSerializable + { + [SerializeField] private long sessionID; + [SerializeField] private TraderData initiator; + [SerializeField] private TraderData responder; + + public TradeSessionData(long sessionID, TraderData initiator, TraderData responder) + { + this.sessionID = sessionID; + this.initiator = initiator; + this.responder = responder; + } + + public long Id { get => sessionID; set => sessionID = value; } + public TraderData Initiator { get => initiator; set => initiator = value; } + public TraderData Respondent { get => responder; set => responder = value; } + + [JsonIgnore] + public string Channel => $"trading.sessions.{sessionID}"; + + public TraderData GetParticipantById(string id) + { + if(initiator.UserID == id) + return initiator; + + if (responder.UserID == id) + return responder; + + Debug.LogWarning($"MissingParticipant: sessionId={sessionID}"); + return default; + } + + public UserId GetUser(Role role) + { + switch (role) + { + case Role.Initiator: + return initiator.UserID; + case Role.Respondent: + return responder.UserID; + default: + return "ERR"; + } + } + + public TraderData GetParticipant(Role role) + { + switch (role) + { + case Role.Initiator: + return initiator; + case Role.Respondent: + return responder; + default: + Debug.LogWarning($"MissingParticipant: sessionId={sessionID}"); + return default; + } + } + + public enum Role + { + Initiator = 0, + Respondent = 1 + } + } + + + //public enum UnexpectedLeave + //{ + // join = 0, + // busyGameOrLobby, + // busyTrading + //} +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs.meta new file mode 100644 index 0000000..7e5d27f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradeSessionData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9fd1d230123310f45b88ad029e3b6b95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs new file mode 100644 index 0000000..51b6c31 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs @@ -0,0 +1,56 @@ +using Newtonsoft.Json; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + [System.Serializable] + public struct TraderData : IJsonSerializable + { + [SerializeField] private string userID; + [SerializeField] private string nickname; + [SerializeField] private int playerAvatarType; + [SerializeField] private int equippedCosmetic; + [SerializeField] private TradeInventoryData tradeableItems; + + public TraderData(string userID, string nickname, int playerAvatarType, TradeInventoryData tradableItems, int equippedHat) + { + this.userID = userID; + this.nickname = nickname; + this.playerAvatarType = playerAvatarType; + this.tradeableItems = tradableItems; + this.equippedCosmetic = equippedHat; + } + + /// + /// PubNub ID + /// + [JsonProperty("pnuser")] + public string UserID { get => userID; set => userID = value; } + + /// + /// The nickname of the player + /// + [JsonProperty("name")] + public string DisplayName { get => nickname; set => nickname = value; } + + /// + /// Character type ID in the library of characters (same as ) + /// + /// Same as the id in + [JsonProperty("char")] + public int PlayerAvatarType { get => playerAvatarType; set => playerAvatarType = value; } + + /// + /// Equipped Hat iD + /// + [JsonProperty("hat")] + public int EquippedCosmetic { get => equippedCosmetic; set => equippedCosmetic = value; } + + /// + /// Items that can be traded + /// + /// as int IDs + [JsonProperty("inventory")] + public TradeInventoryData Inventory { get => tradeableItems; set => tradeableItems = value; } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs.meta new file mode 100644 index 0000000..56f0b42 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aaad5cb911bf2cc429f7b45746a01412 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs new file mode 100644 index 0000000..d2de0db --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs @@ -0,0 +1,38 @@ +using System; +using System.Threading.Tasks; +using Unity.VisualScripting; +using UnityEngine; +using Visyde; + +namespace PubNubUnityShowcase +{ + public class TraderDataCached : ITradingDatastore + { + async Task ITradingDatastore.GetTraderData(string traderID) + { + TradeInventoryData inventory = TradeInventoryData.GetEmpty(); + if (PNManager.pubnubInstance.CachedPlayers.TryGetValue(traderID, out var metadata)) + inventory = new TradeInventoryData(MetadataNormalization.GetHats(metadata.Custom)); + + await Task.CompletedTask; + + int chosenCharacter = 0; + if (metadata.Custom.ContainsKey("chosen_character")) + { + chosenCharacter = Int32.Parse(metadata.Custom["chosen_character"].ToString()); + } + //Legacy Default situations + else + { + metadata.Custom.Add("chosen_character", 0); // Defaults to the first character. + PNManager.pubnubInstance.CachedPlayers[traderID].Custom = metadata.Custom; + } + return new TraderData( + traderID, + metadata.Name, + chosenCharacter, + inventory, + inventory.CosmeticItems[0]); // using the first hat in the player's inventory, not their selected hat. + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs.meta new file mode 100644 index 0000000..4a73031 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TraderDataCached.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e28a9bd3ef1a59546a6ee2de1f6fa3f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs new file mode 100644 index 0000000..69b0db6 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs @@ -0,0 +1,305 @@ +using PubnubApi; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Unity.VisualScripting; +using UnityEngine; +using UnityEngine.Profiling.Memory.Experimental; +using Visyde; + +namespace PubNubUnityShowcase +{ + public class TradingController : + ITrading, + ITradingDatastore, + IDisposable + + { + private List inviteSubscribers; + private List sessionSubscribers; + private readonly PubNubTrading _network; + private readonly string _you; + + public bool InLobbyOrMatch => Connector.instance.CurrentRoom != null; + public bool InSession { get => SessionData.Id > 0; } + private PubNubTrading Network => _network; + private string You { get => _you; } + private TradeSessionData SessionData { get; set; } + + private string DebugTag => $"[Trading]"; + private string DebugSession => $"(Session:{SessionData.Id})"; + private ITrading Trading => this; + + private OfferData SentOffer { get; set; } + + public TradingController(string userID) + { + _you = userID; + + _network = new PubNubTrading(); + _network.ReceivedInvite += OnReceiveTradeInvite; + _network.ReceivedInviteResponse += OnReceiveInviteResponse; + _network.ReceivedOffer += OnReceiveOffer; + _network.SessionPresenceChanged += OnSessionOccupancyChanged; + _network.ParticipantGoodbye += OnParticipantGoodbye; + + inviteSubscribers = new List(); + sessionSubscribers = new List(); + } + + #region ITrading + + /// Name, avatarType and equipped are still taken from cache until properly implemented + async Task ITradingDatastore.GetTraderData(string traderID) + { + TradeInventoryData inventory = await _network.GetTraderInventory(traderID); + + if (PNManager.pubnubInstance.CachedPlayers.TryGetValue(traderID, out var metadata)) + inventory = new TradeInventoryData(MetadataNormalization.GetHats(metadata.Custom)); + int chosenCharacter = 0; + if (metadata.Custom.ContainsKey("chosen_character")) + { + chosenCharacter = Int32.Parse(metadata.Custom["chosen_character"].ToString()); + } + //Legacy Default situations + else + { + metadata.Custom.Add("chosen_character", 0); // Defaults to the first character. + PNManager.pubnubInstance.CachedPlayers[traderID].Custom = metadata.Custom; + } + return new TraderData( + traderID, + metadata.Name, + chosenCharacter, + inventory, + inventory.CosmeticItems[0]); // using the first hat in the player's inventory, not their selected hat. + } + + async void ITrading.JoinTradingAsync() + { + try + { + await Network.SubscribeToTradeInvites(); + Debug.Log($"{DebugTag} Joined Trading."); + } + catch (System.Exception e) { Debug.LogError($"{DebugTag} Exception: {e}"); } + } + + async Task ITrading.DisconnectTradingAsync() + { + try + { + await Network.UnubscribeToTradeInvites(); + if (InSession) + await Network.UnsubscribeSession(SessionData); + Debug.Log($"{DebugTag} Disconnect Trading."); + } + catch (System.Exception e) { Debug.LogError($"{DebugTag} Exception: {e}"); } + } + + TradeSessionData ITrading.GenerateSessionData(TraderData initiator, TraderData respondent) + { + SessionData = new TradeSessionData(GetRandomSessionID(), initiator, respondent); + return SessionData; + } + + async Task ITrading.SendInviteAsync(OfferData offer) + { + var invite = new TradeInvite(SessionData, offer); + await Network.SendTradeInviteAsync(invite); + } + + async Task ITrading.InviteRespondAsync(TradeInvite invite, InviteResponseData response) + { + if (response.WillJoin) + await Network.SubscribeSession(invite.SessionData); + } + + async Task ITrading.JoinSessionAsync(TradeSessionData session) + { + try + { + await Network.SubscribeSession(session); + SessionData = session; + } + catch (Exception e) + { + + throw e; + } + Debug.Log($"{DebugTag} ({SessionData.Id}) Joined Session."); + } + + async Task ITrading.LeaveSessionAsync(LeaveSessionData leaveData) + { + var id = SessionData.Id; + + try + { + await Network.UnsubscribeSession(SessionData); + await Network.SendLeaveMessage(SessionData, leaveData); + SessionData = default; + } + catch (Exception e) + { + throw e; + } + Debug.Log($"{DebugTag} ({id}) Left Session."); + } + + async Task ITrading.SendOfferAsync(OfferData offer) + { + SentOffer = await Network.SendOffer(SessionData, offer); + } + + void ITrading.SubscribeTradeInvites(ITradeInviteSubscriber subscriber) + { + inviteSubscribers.Add(subscriber); + Debug.Log($"{DebugTag} : subscribed={subscriber.GetType().Name} subs={inviteSubscribers.Count}"); + } + + void ITrading.SubscribeSessionEvents(ITradeSessionSubscriber subscriber) + { + sessionSubscribers.Add(subscriber); + Debug.Log($"{DebugTag} : subscribed={subscriber.GetType().Name} subs={sessionSubscribers.Count}"); + } + + void ITrading.UnsubscribeTradeInvites(ITradeInviteSubscriber subscriber) + { + inviteSubscribers.Remove(subscriber); + } + + void ITrading.UnsubscribeSessionEvents(ITradeSessionSubscriber subscriber) + { + sessionSubscribers.Remove(subscriber); + } + + #endregion + + #region Network Event Handlers + private async void OnReceiveTradeInvite(TradeInvite invite) + { + var json = ((IJsonSerializable)invite).RawJson; + + Debug.Log($"{DebugTag} ReceivedTradeInvite: >>>{json}<<<"); + + //notify listeners + foreach (var sub in inviteSubscribers) + sub.OnTradeInviteReceived(invite); + + InviteResponseData response; + + if (InLobbyOrMatch) + { + response = new InviteResponseData(false, false, true); + } + else if (InSession) + { + response = new InviteResponseData(false, true, false); + } + else + { + response = new InviteResponseData(true, false, false); + + + //note: Auto Join session (it can be also a notification button in the UI) + await Trading.JoinSessionAsync(invite.SessionData); + } + + await Network.SendInviteResponse(invite, response); + + //notify listeners + foreach (var sub in inviteSubscribers) + sub.OnTradeInviteReceived(invite); + } + + private void OnReceiveInviteResponse(InviteResponseData response) + { + Debug.Log($"[Trading] You received Invite Response"); + + foreach (var sub in inviteSubscribers) + { + sub.OntradeInviteResponse(response); + } + } + + private async void OnReceiveOffer(OfferData offer) + { + Debug.Log($"[Trading] offer=>>>{((IJsonSerializable)offer).RawJson}"); + + string target = SessionData.GetUser(offer.Target); + + switch (offer.State) + { + case OfferData.OfferState.open: + if (target.Equals(You)) + { + foreach (var sub in sessionSubscribers) + sub.OnCounterOffer(offer); + } + break; + case OfferData.OfferState.accepted: + await Network.ApplyMetadata(SessionData, offer); + + foreach (var sub in sessionSubscribers) + sub.OnTradingCompleted(offer); + + break; + case OfferData.OfferState.rejected: + foreach (var sub in sessionSubscribers) + sub.OnTradingCompleted(offer); + break; + default: + break; + } + } + + private void OnParticipantGoodbye(LeaveSessionData leaveData) + { + //Ignore own events + if (leaveData.Participant.UserID.Equals(You)) + return; + + foreach (var sub in sessionSubscribers) + sub.OnParticipantGoodbyeAsync(leaveData); + } + + private void OnSessionOccupancyChanged(string user, string eventType) + { + //Ignore own events + if (user.Equals(You)) + return; + + var participant = SessionData.GetParticipantById(user); + + switch (eventType) + { + case "join": + foreach (var sub in sessionSubscribers) + sub.OnParticipantJoined(participant); + break; + case "leave": + foreach (var sub in sessionSubscribers) + sub.OnLeftUnknownReason(participant); + break; + default: + break; + } + } + #endregion + + //Probably it is possible to generate some uid from the time token + private long GetRandomSessionID() + { + return UnityEngine.Random.Range(100000, 999999); + } + + public async void Dispose() + { + await ((ITrading)this).DisconnectTradingAsync(); + + + Network.Dispose(); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs.meta new file mode 100644 index 0000000..bcd25a0 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01fce80b0be1f624291f9b381314998c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs new file mode 100644 index 0000000..c41819f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs @@ -0,0 +1,179 @@ +using PubnubApi; +using PubNubUnityShowcase.ScriptableObjects; +using PubNubUnityShowcase.UIComponents; +using System; +using System.Threading; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.UI; +using Visyde; + +namespace PubNubUnityShowcase +{ + /// + /// Trading Service (Singleton) + /// To Integrate into any UI just implement this interface and subscribe with + /// TradingService.Instance.Trading.SubscribeTradeInvites(this);
+ /// TradingService.Instance.Trading.SubscribeSessionEvents(this); + ///
+ + public class TradingService : MonoBehaviour, + ITradeInviteSubscriber + { + public static TradingService Instance; //To work as a Singleton + + [Header("Components")] + [SerializeField] private Canvas canvas; //The canvas where the view will be instantiated + + [Header("Assets")] + [SerializeField] private CosmeticsLibrary assets; //Assets + [SerializeField] private TradingView tradingViewPrefab; //View Prefab + [SerializeField] private Text debugText; + + + //private CancellationTokenSource cts; + private TradingView view; + private Pubnub pubnub { get { return PNManager.pubnubInstance.pubnub; } } + private TradingController _tradingController; + private TraderDataCached _cachedTraders; + + public ITrading Trading => _tradingController; + public ITradingDatastore Datastore { get; private set; } + private IAvatarLibrary AvatarAssets => assets; + private ICosmeticItemLibrary CosmeticAssets => assets; + + public TradingService InitializeAsSingleton(string name, bool persistent) + { + if (Instance == null) + { + Instance = this; + gameObject.name = "manager: " + name; + } + + else if (Instance != this) + Destroy(gameObject); + if (persistent == true) + { + gameObject.transform.SetParent(null); + DontDestroyOnLoad(gameObject); + } + + return Instance; + } + + public void CloseView() + { + if (view == null) + return; + + Dispose(); + Destroy(view.gameObject); + } + + private async void Start() + { + PNManager.pubnubInstance.onPubNubReady += OnPnReady; + } + + private void OnDestroy() + { + Dispose(); + } + + private void OnPnReady() + { + InitializeAsSingleton("TradingService", true); + _tradingController = new TradingController(pubnub.GetCurrentUserId()); + Trading.SubscribeTradeInvites(this); + Trading.JoinTradingAsync(); + + Datastore = _tradingController; //requests are done every time view is opened + //Datastore = new TraderDataCached(); //data is taken from cache + if (debugText != null) + { + debugText.text = pubnub.GetCurrentUserId(); + } + } + + /// + /// Opens the trading window + /// + /// + /// if this token is cancelled it should cancel all async operations of the view + /// Not every async method in the view uses tokens tho, but they can be added as needed + public TradingView OpenView(TradingViewData viewData, CancellationToken token) + { + if (view != null) + return null; + + //Spawn the view + view = Instantiate(tradingViewPrefab, canvas.transform); + view.Construct(viewData, token); + view.OnOpenView(); + return view; + } + + /// + /// Helper to get proper data for the view + /// + public async Task GetViewDataInitiator(string targetUser, CancellationToken token) + { + TradingView.Services services = new TradingView.Services(CosmeticAssets, AvatarAssets, Trading, token); + + var initiator = await Datastore.GetTraderData(pubnub.GetCurrentUserId()); + var respondent = await Datastore.GetTraderData(targetUser); + + TradingViewData viewData = new TradingViewData(initiator, respondent, services, TradingView.StateType.initiator); + + return viewData; + } + + /// + /// Helper to get proper data for the view + /// To Integrate into any UI just implement this interface and subscribe with + /// TradingService.Instance.Trading.SubscribeTradeInvites(this);
+ /// TradingService.Instance.Trading.SubscribeSessionEvents(this); + ///
+ public TradingViewData GetViewDataRespondent(TradeSessionData session, OfferData offer, CancellationToken token) + { + TradingView.Services services = new TradingView.Services(CosmeticAssets, AvatarAssets, Trading, token); + TradingViewData viewData = new TradingViewData(session.Initiator, session.Respondent, services, TradingView.StateType.respondent); + + viewData.SetStateData(session, offer); + + return viewData; + } + + //To Integrate into any UI just implement this interface and subscribe with + //TradingService.Instance.Trading.SubscribeSessionEvents(this); + //TradingService.Instance.Trading.SubscribeTradeInvites(this); + + #region ITradeInviteSubscriber + void ITradeInviteSubscriber.OnTradeInviteReceived(TradeInvite invite) + { + var cts = new CancellationTokenSource(); + var viewData = GetViewDataRespondent(invite.SessionData, invite.OfferData, cts.Token); + OpenView(viewData, cts.Token); + } + + void ITradeInviteSubscriber.OnTradeInviteWithdrawn(TradeInvite invite) + { + //View should be also subscribed to this event and will handle closing. + //also notification icons for trading can use this + } + + void ITradeInviteSubscriber.OntradeInviteResponse(InviteResponseData response) + { + //Debug.Log($"Respondent: json={((IJsonSerializable)response).RawJson}"); + } + + #endregion + + private void Dispose() + { + view = null; + Trading?.UnsubscribeTradeInvites(this); + _tradingController.Dispose(); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs.meta new file mode 100644 index 0000000..6c0a8dc --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingService.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36bc852c381bb4d47868fb9366600439 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs new file mode 100644 index 0000000..ce280b2 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs @@ -0,0 +1,41 @@ +using PubNubUnityShowcase.UIComponents; +using System.Threading; + +namespace PubNubUnityShowcase +{ + /// + /// Initialization data for + /// + public class TradingViewData + { + private readonly TraderData _initiator; + private readonly TraderData _respondent; + private readonly TradingView.Services _services; + private readonly TradingView.StateType _mode; + + public TradingViewData(TraderData sellerPlayer, TraderData buyerPlayer, TradingView.Services services, TradingView.StateType mode) + { + _initiator = sellerPlayer; + _respondent = buyerPlayer; + _services = services; + _mode = mode; + } + + public TradingView.StateType State { get => _mode; } + public TraderData Initiator { get => _initiator; } + public TraderData Respondent { get => _respondent; } + public TradeSessionData Session { get; private set; } + public OfferData InitiatorOffer { get; private set; } + public TradingView.Services Services { get => _services; } + + /// + /// RespondentState + /// + /// + public void SetStateData(TradeSessionData sessionData, OfferData initiatorOffer) + { + InitiatorOffer = initiatorOffer; + Session = sessionData; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs.meta new file mode 100644 index 0000000..cf3bc5c --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58fba9413ce3b3a47ac4048edf059293 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs new file mode 100644 index 0000000..34e4932 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs @@ -0,0 +1,65 @@ +using PubNubUnityShowcase.UIComponents; +using System; + +namespace PubNubUnityShowcase +{ + public abstract class TradingViewStateBase + { + + private readonly TradeSessionData _sessionData; + private readonly TradingView.UIComponents _ui; + private FlowBase _flow; + protected readonly TradingView.Services _services; + + protected FlowBase Flow { get => _flow; set => _flow = value; } + protected TradeSessionData SessionData => _sessionData; + protected TradingView.UIComponents UI => _ui; + + public bool UIElementsInitialized { get; set; } + + public event Action CloseViewRequested; + + protected TradingView.Services Services { get => _services; } + protected TradingViewStateBase(TradeSessionData sessionData, TradingView.Services services, TradingView.UIComponents ui) + { + _sessionData = sessionData; + _ui = ui; + + _services = services; + } + + public void Join() + { + Services.Trading.JoinSessionAsync(SessionData); + } + + public void InvokeCloseViewRequest() + { + CloseViewRequested?.Invoke(); + } + + private void InvokeCloseViewRequest(string _) + { + CloseViewRequested?.Invoke(); + } + + public virtual void Dispose() + { + Flow.Unload(); + } + + public void StateSessionComplete(string message, bool autoclose = false) + { + Flow.Unload(); + Flow = new FlowSessionClosed(message, SessionData, this, UI, Services); + Flow.Load(); + + if (autoclose) + { + + } + + + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs.meta new file mode 100644 index 0000000..33f9622 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fe6070347375f3443bcf9720e2abdf57 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs new file mode 100644 index 0000000..1d8082a --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs @@ -0,0 +1,119 @@ +using PubNubUnityShowcase.UIComponents; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + /// + /// Initiator Session Controller + /// + public class TradingViewStateInitiator : TradingViewStateBase, + ITradeSessionSubscriber, + ITradeInviteSubscriber + { + public TradingViewStateInitiator(TradeSessionData sessionData, TradingView.Services services, TradingView.UIComponents ui) : base(sessionData, services, ui) + { + Flow = new FlowCreateInitialOffer(sessionData, this, ui, services); + Flow.Load(); + + Services.Trading.SubscribeSessionEvents(this); + Services.Trading.SubscribeTradeInvites(this); + } + + public override void Dispose() + { + base.Dispose(); + Services.Trading.UnsubscribeTradeInvites(this); + Services.Trading.UnsubscribeSessionEvents(this); + } + + #region ITradeSessionSubscriber + void ITradeSessionSubscriber.OnParticipantJoined(TraderData participant) + { + + } + + async void ITradeSessionSubscriber.OnParticipantGoodbyeAsync(LeaveSessionData leaveData) + { + Debug.LogError($"{leaveData.Participant.DisplayName} Left the trade: {leaveData.Reason}"); + + if (leaveData.Reason == LeaveReason.withdrawOffer) + { + LeaveSessionData myLeave = new LeaveSessionData(SessionData.Initiator, LeaveReason.withdrawOffer); + await Services.Trading.LeaveSessionAsync(myLeave); //You leave too + + Flow.Unload(); + Flow = new FlowSessionClosed("Offer Withdraw", SessionData, this, UI, Services); + Flow.Load(); + } + } + + void ITradeSessionSubscriber.OnLeftUnknownReason(TraderData participant) + { + + } + + async void ITradeSessionSubscriber.OnTradingCompleted(OfferData offerData) + { + Flow.ReceivedOfferResponse = true; + + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.transactionComplete)); + + if (offerData.State == OfferData.OfferState.accepted) + StateSessionComplete($"Trade successfull"); + + if (offerData.State == OfferData.OfferState.rejected) + StateSessionComplete($"Trade Rejected"); + } + + void ITradeSessionSubscriber.OnCounterOffer(OfferData offerData) + { + Flow.ReceivedOfferResponse = true; + + Flow.Unload(); + Flow = new FlowOfferReceived(offerData, SessionData, this, UI, Services); + Flow.Load(); + } + + #endregion + + #region ITradeInviteSubscriber + void ITradeInviteSubscriber.OnTradeInviteReceived(TradeInvite invite) + { + //Send message that the user is busy trading (since this view can't be opened inGameOrLobby is asumed false) + Services.Trading.InviteRespondAsync(invite, new InviteResponseData(false, true, false)); + } + + void ITradeInviteSubscriber.OnTradeInviteWithdrawn(TradeInvite invite) + { + //self close will be handled elsewhere + } + + async void ITradeInviteSubscriber.OntradeInviteResponse(InviteResponseData response) + { + //only handle refuse to join (joins will handled as ITradeSessionSubscriber) + Debug.Log($"Respondent: json={((IJsonSerializable)response).RawJson}"); + Flow.TradeInviteResponceReceived = true; + + if (response.WillJoin == false) + { + //why? + if (response.InGameOrLobby) + { + StateSessionComplete($"{SessionData.Respondent.DisplayName} is in Match"); + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.otherPartyBusy)); + } + + else if (response.InTradingSession) + { + StateSessionComplete($"{SessionData.Respondent.DisplayName} is Trading with another player"); + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.otherPartyBusy)); + } + } + else + { + UI.OfferPanel.SetSessionStatus($"{SessionData.Respondent.DisplayName} checking your offer"); + } + } + #endregion + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs.meta new file mode 100644 index 0000000..ee814b3 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateInitiator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a348c1a4d7febf847948d2e9fedc9a95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs new file mode 100644 index 0000000..e8d9efe --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs @@ -0,0 +1,82 @@ +using PubNubUnityShowcase.UIComponents; +using System; +using UnityEngine; + +namespace PubNubUnityShowcase +{ + /// + /// Respondent Session Controller + /// + public class TradingViewStateRespondent : TradingViewStateBase, + ITradeSessionSubscriber + { + public TradingViewStateRespondent(TradeSessionData sessionData, OfferData originalOffer, TradingView.Services services, TradingView.UIComponents ui) : base(sessionData, services, ui) + { + Flow = new FlowOfferReceived(originalOffer, sessionData, this, ui, services); + Flow.Load(); + Services.Trading.SubscribeSessionEvents(this); + } + + public override void Dispose() + { + base.Dispose(); + Services.Trading.UnsubscribeSessionEvents(this); + } + + #region ITradeSessionSubscriber + void ITradeSessionSubscriber.OnParticipantJoined(TraderData participant) + { + Debug.LogWarning("Respondent should always join second. Something went wrong"); + } + + async void ITradeSessionSubscriber.OnParticipantGoodbyeAsync(LeaveSessionData leaveData) + { + //Debug.LogError($"{leaveData.Participant.DisplayName} Left the trade: {leaveData.Reason}"); + + if (leaveData.Reason == LeaveReason.withdrawOffer) + { + LeaveSessionData myLeave = new LeaveSessionData(SessionData.Initiator, LeaveReason.withdrawOffer); + await Services.Trading.LeaveSessionAsync(myLeave); //You leave too + + Flow.Unload(); + Flow = new FlowSessionClosed("Offer Withdraw", SessionData, this, UI, Services); + Flow.Load(); + } + } + + void ITradeSessionSubscriber.OnLeftUnknownReason(TraderData participant) + { + Flow.Unload(); + Flow = new FlowSessionClosed("Offer Withdraw", SessionData, this, UI, Services); + Flow.Load(); + } + + async void ITradeSessionSubscriber.OnTradingCompleted(OfferData offerData) + { + Flow.ReceivedOfferResponse = true; + + await Services.Trading.LeaveSessionAsync(new LeaveSessionData(SessionData.Initiator, LeaveReason.transactionComplete)); + if (offerData.State == OfferData.OfferState.accepted) + StateSessionComplete($"Trade successfull"); + + if (offerData.State == OfferData.OfferState.rejected) + StateSessionComplete($"Trade Rejected"); + } + + void ITradeSessionSubscriber.OnCounterOffer(OfferData offerData) + { + Flow.ReceivedOfferResponse = true; + + Debug.LogWarning("------------>Received Counteroffer: "); + + //UI.OfferPanel.SetLabel("counter offer"); + + Flow.Unload(); + Flow = new FlowOfferReceived(offerData, SessionData, this, UI, Services); + Flow.Load(); + } + #endregion + + + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs.meta new file mode 100644 index 0000000..f1393b5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/TradingViewStateRespondent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b8f0f7c3d68bab4ab9f191836936d3a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents.meta new file mode 100644 index 0000000..774cd9b --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7593c340a4f1d234ebbbbfdf41013fd0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs new file mode 100644 index 0000000..67f8024 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs @@ -0,0 +1,52 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace PubNubUnityShowcase +{ + public class ActionButton : MonoBehaviour + { + [SerializeField] private Button button; + [SerializeField] private Text labelText; + private string _id; + + private Action clickCallback; + + public void Construct(string id, string label) + { + _id = id; + gameObject.name = $"--button-" + id; + + if (button != null) + button.onClick.AddListener(OnBtnClick); + + SetLabel(label); + } + + public void SetLabel(string label) + { + labelText.text = label; + } + + public void SetClickInteraction(Action callback) + { + clickCallback = null; + clickCallback += callback; + } + + public void SetInteraction(bool state) + { + button.interactable = state; + } + + public void RemoveClickInteractions() + { + clickCallback = null; + } + + private void OnBtnClick() + { + clickCallback?.Invoke(_id); + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs.meta new file mode 100644 index 0000000..fdcad0f --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aa5984ca6f363ab4791655dd355d258e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs new file mode 100644 index 0000000..0e69c02 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs @@ -0,0 +1,89 @@ +using PubnubApi; +using PubNubUnityShowcase; +using System; +using System.Collections.Generic; +using UnityEngine; + +public class ActionButtonsPanel : MonoBehaviour +{ + [SerializeField] private ActionButton buttonPrefab; + [SerializeField] private RectTransform root; + + private Dictionary buttons = new Dictionary(); + + public void AddButton(string id, string label, Action callback) + { + if(buttons.ContainsKey(id)) + { + ChangeButton(id, callback, label); + return; + } + + var btn = Instantiate(buttonPrefab, root, false); + btn.Construct(id, $"{label}"); + btn.SetClickInteraction(callback); + buttons.Add(id, btn); + } + + public void RemoveButton(string id) + { + if (buttons.ContainsKey(id)) + Destroy(buttons[id].gameObject); + + buttons.Remove(id); + } + + public void RemoveAll() + { + foreach (var btn in buttons.Values) + { + Destroy(btn.gameObject); + } + + buttons.Clear(); + } + + public void ChangeButton(string id, Action callback, string label = "") + { + if (buttons.ContainsKey(id)) + { + buttons[id].SetClickInteraction(callback); + + if (!string.IsNullOrEmpty(label)) + buttons[id].SetLabel(label); + } + } + + public void SetButtonInteractable(string id , bool state) + { + if (buttons.ContainsKey(id)) + { + buttons[id].SetInteraction(state); + } + else + Debug.LogWarning($"Can't find key {id}"); + } + + public void Arrange(List idInOrder, bool reverse = false) + { + if (reverse) + idInOrder.Reverse(); + + Queue queue = new Queue(idInOrder); + Queue btnsInOrder = new Queue(); + + while (queue.Count > 0) + { + var id = queue.Dequeue(); + + if (buttons.ContainsKey(id)) + btnsInOrder.Enqueue(buttons[id]); + } + + while (btnsInOrder.Count > 0) + { + var btn = btnsInOrder.Dequeue(); + btn.transform.SetAsFirstSibling(); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs.meta new file mode 100644 index 0000000..f6922d5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/ActionButtonsPanel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d709a521e87d46c40901a911be1f5305 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs new file mode 100644 index 0000000..aed1b31 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs @@ -0,0 +1,100 @@ +using PubNubUnityShowcase.ScriptableObjects; +using UnityEngine; +using UnityEngine.UI; + +namespace PubNubUnityShowcase.UIComponents +{ + public class AvatarPanel : MonoBehaviour + { + //[SerializeField] private RectTransform hatRoot; + [SerializeField] private Image bodyImage; + [SerializeField] private Image hatImage; + [SerializeField] private Text nicknameText; + + private IAvatarLibrary _avatars; + private ICosmeticItemLibrary _cosmetics; + + private Vector3 initialPos; + + private InventorySlot _linkedSlot; + private int _fallbackCosmetic; + private TraderInventoryPanel _ownedInventory; + + private void Awake() + { + initialPos = hatImage.transform.localPosition; + } + + public void Construct(IAvatarLibrary avatars, ICosmeticItemLibrary cosmetics, InventorySlot slot, TraderInventoryPanel ownedInventory, int fallbackCosmetic) + { + _avatars = avatars; + _cosmetics = cosmetics; + _linkedSlot = slot; + _ownedInventory = ownedInventory; + _fallbackCosmetic = fallbackCosmetic; + + _linkedSlot.ContentChanged += OnSlotContentChange; + _ownedInventory.ItemTaken += OnTakenFromInventory; + } + + public void SetBody(int body) + { + var bodyData = _avatars.GetAvatar(body); + + bodyImage.sprite = bodyData.UiSprite; + + //note: also set hat root if needed + } + + /// + /// Sets look direction to left or right + /// + /// + /// set either 1 or -1 + public void SetLookDirection(int dir = 1) + { + bodyImage.transform.localScale = new Vector3(dir, 1, 1); + hatImage.transform.localScale = new Vector3(dir, 1, 1); + } + + public void SetHat(int hat) + { + CosmeticItem hatData = _cosmetics.GetCosmeticItem(hat); + + hatImage.sprite = hatData.UiSprite; + hatImage.transform.localPosition = new Vector3(initialPos.x, initialPos.y + hatData.OffsetY, initialPos.z); + } + + public void SetHatVisibility(bool state) + { + hatImage.color = state ? new Color(1, 1, 1, 0) : Color.white; + } + + private void OnSlotContentChange() + { + //SetHatVisibility(_linkedSlot.Item.ItemID == _fallbackCosmetic || !_linkedSlot.IsFull); + + if (_linkedSlot.IsFull) + SetHat(_linkedSlot.Item.ItemID); + else + SetHat(_fallbackCosmetic); + } + + public void SetNickname(string nickname) + { + nicknameText.text = nickname; + } + + private void OnTakenFromInventory(CosmeticItem item) + { + //SetHatVisibility(item.ItemID == _fallbackCosmetic); + } + + + private void OnDisable() + { + if (_linkedSlot != null) + _linkedSlot.ContentChanged -= OnSlotContentChange; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs.meta new file mode 100644 index 0000000..709922e --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/AvatarPanel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ac6f9398367b924bad546f2e5f560ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs new file mode 100644 index 0000000..29248d5 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs @@ -0,0 +1,86 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace PubNubUnityShowcase.UIComponents +{ + + public class InventorySlot : MonoBehaviour + { + [SerializeField] private Image contentImage; + [SerializeField] private Button button; + + private Action clickCallback; + + public bool IsFull { get; private set; } + public CosmeticItem Item { get; private set; } + private bool AllowClicks { get; set; } + + private int _indexInGrid; + + private static Color ColNormal = Color.white; + private static Color ColGrey = new Color(0.4f, 0.4f, 0.4f, 1f); + + public event Action ContentChanged; + + public void Construct(int indexInGrid, string goName = "--slot") + { + _indexInGrid = indexInGrid; + + gameObject.name = goName; + + if (button != null) + button.onClick.AddListener(OnBtnClick); + + AllowClicks = true; + } + + public void SetItemGreyed(bool state) + { + if (IsFull) + contentImage.color = state ? ColGrey : ColNormal; + else + SetEmpty(); + } + + public void SetLocked(bool state) + { + AllowClicks = !state; + } + + public void SetEmpty() + { + IsFull = false; + + contentImage.color = new Color(1, 1, 1, 0); + ContentChanged?.Invoke(); + } + + public void SetItem(CosmeticItem item) + { + Item = item; + IsFull = true; + + contentImage.color = new Color(1, 1, 1, 1); + contentImage.sprite = item.UiSprite; + ContentChanged?.Invoke(); + } + + public void SetClickInteraction(Action callback) + { + clickCallback += callback; + } + + public void RemoveClickInteractions() + { + clickCallback = null; + } + + private void OnBtnClick() + { + //if the slot is empty it won't send events + if (AllowClicks && IsFull) + clickCallback?.Invoke(_indexInGrid); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs.meta new file mode 100644 index 0000000..3adb8af --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/InventorySlot.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0608fd8850e57db4a85c626602dd3ef0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs new file mode 100644 index 0000000..41c6339 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs @@ -0,0 +1,123 @@ +using System; +using Unity.VisualScripting.Antlr3.Runtime.Misc; +using UnityEngine; +using UnityEngine.UI; + +namespace PubNubUnityShowcase.UIComponents +{ + public class OfferPanel : MonoBehaviour + { + [SerializeField] private InventorySlot initiatorSlot; + [SerializeField] private InventorySlot responderSlot; + [SerializeField] private Text labelText; + [SerializeField] private Text sessionStatusText; + + public InventorySlot InitiatorSlot => initiatorSlot; + public InventorySlot ResponderSlot => responderSlot; + + public bool HaveValidOffer + { + get + { + bool filled = (initiatorSlot.IsFull) && (responderSlot.IsFull); + bool diff = !initiatorSlot.Item.Equals(responderSlot.Item); + + return filled && diff; + } + } + + public event Action ItemTakenInitiator; + public event Action ItemTakenResponder; + + public event Action AnyChange; + + public void Construct() + { + initiatorSlot.Construct(0, $"--slot-initiator"); + initiatorSlot.SetEmpty(); + initiatorSlot.SetClickInteraction(OnInitiatorClicked); + initiatorSlot.ContentChanged += OnAnyChange; + + responderSlot.Construct(0, $"--slot-responder"); + responderSlot.SetEmpty(); + responderSlot.SetClickInteraction(OnRespondentClicked); + responderSlot.ContentChanged += OnAnyChange; + } + + public void EmptySlots(bool initiator, bool responder) + { + if (initiator) + InitiatorSlot.SetEmpty(); + + if (responder) + ResponderSlot.SetEmpty(); + } + + public void LoadOffer(CosmeticItem initiator, CosmeticItem responder) + { + InitiatorSlot.SetItem(initiator); + InitiatorSlot.SetItem(responder); + } + + public bool SetInitiatorGive(CosmeticItem item) + { + if (!InitiatorSlot.IsFull) + { + InitiatorSlot.SetItem(item); + return true; + } + else + return false; + } + + public bool SetInitiatorReceive(CosmeticItem item) + { + if (!ResponderSlot.IsFull) + { + ResponderSlot.SetItem(item); + return true; + } + else + return false; + } + + private void OnInitiatorClicked(int _) + { + if(InitiatorSlot.IsFull) + { + ItemTakenInitiator?.Invoke(InitiatorSlot.Item); + InitiatorSlot.SetEmpty(); + } + } + + private void OnRespondentClicked(int _) + { + if (ResponderSlot.IsFull) + { + ItemTakenResponder?.Invoke(ResponderSlot.Item); + ResponderSlot.SetEmpty(); + } + } + + public void SetLocked(bool state) + { + initiatorSlot.SetLocked(state); + responderSlot.SetLocked(state); + } + + public void SetLabel(string str) + { + labelText.text = str; + } + + public void SetSessionStatus(string str) + { + sessionStatusText.text = str; + } + + private void OnAnyChange() + { + AnyChange?.Invoke(); + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs.meta new file mode 100644 index 0000000..71eb3e1 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/OfferPanel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6573589462130074bb98a14584408b35 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs new file mode 100644 index 0000000..c7b593e --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace PubNubUnityShowcase { + public class PubNubTime : MonoBehaviour + { + + [SerializeField] private double timeToken; + [SerializeField] private string timeUTC; + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + timeUTC = UnixTimeStampToDateTime(timeToken).ToString(); + } + + public static DateTime UnixTimeStampToDateTime(double unixTimeStamp) + { + // Unix timestamp is seconds past epoch + DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); + dateTime = dateTime.AddSeconds(unixTimeStamp).ToLocalTime(); + return dateTime; + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs.meta new file mode 100644 index 0000000..4796be9 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/PubNubTime.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89fd51e430aaa37459ad829c96e56b00 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs new file mode 100644 index 0000000..806aa5d --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace PubNubUnityShowcase.UIComponents +{ + public class TraderInventoryPanel : MonoBehaviour + { + [Header("Components")] + [SerializeField] private RectTransform gridRoot; + [SerializeField] private InventorySlot slotPrefab; + [SerializeField] private CanvasGroup panelGroup; + + private int _slotCount = 8; + private ICosmeticItemLibrary _cosmeticsLibrary; + private Dictionary slots = new Dictionary(); + + public event Action ItemTaken; + + public void Construct(ICosmeticItemLibrary cosmeticsLibrary, int maxSlots = 8) + { + _cosmeticsLibrary = cosmeticsLibrary; + _slotCount = maxSlots; + + for (int i = 0; i <= _slotCount - 1; i++) + { + var slot = Instantiate(slotPrefab, gridRoot, false); + slot.Construct(i, $"--slot-[{i}]"); + slot.SetClickInteraction(OnClick); + slots.Add(i, slot); + } + } + + public void SetVisibility(bool state) + { + panelGroup.alpha = state ? 1 : 0; + panelGroup.interactable = state; + } + + public void SetInteraction(bool state) + { + foreach (var slot in slots.Values) + { + slot.SetItemGreyed(!state); + } + + panelGroup.interactable = state; + } + + public void SetInteraction(int slot, bool state) + { + slots[slot].SetItemGreyed(state); + } + + private void OnClick(int slotIndex) + { + //Debug.Log($"Clicked index: {slotIndex}"); + var item = slots[slotIndex].Item; + slots[slotIndex].SetEmpty(); + ItemTaken?.Invoke(item); + } + + public void PutAnywhere(CosmeticItem item) + { + var emptySlot = slots.First(s => !s.Value.IsFull).Value; + emptySlot.SetItem(item); + } + + public void RemoveItem(CosmeticItem item) + { + var itemSlot = slots.First(s => s.Value.Item.Equals(item)).Value; + itemSlot.SetEmpty(); + } + + public List CheckDuplicates(List items, bool andDisableSlot = false) + { + List duplicates = new List(); + + foreach (var item in items) + { + foreach (var slot in slots.Values) + { + if (!slot.IsFull) + continue; + + if (item.Equals(slot.Item)) + { + slot.SetItemGreyed(andDisableSlot); + slot.RemoveClickInteractions(); + duplicates.Add(item.ItemID); + } + } + } + return duplicates; + } + + public List GetCosmetics() + { + List results = new List(); + + foreach (var slot in slots.Values) + { + if (!slot.IsFull) + continue; + + results.Add(slot.Item); + } + + return results; + } + + public void UpdateData(TradeInventoryData data) + { + if (data.CosmeticItems.Count <= 0 || _cosmeticsLibrary == null) + { + Debug.LogWarning("Data error"); + return; + } + + for (int i = 0; i <= slots.Count - 1; i++) + { + bool isEmpty = i >= data.CosmeticItems.Count; + + if (!isEmpty) + { + CosmeticItem itemData = _cosmeticsLibrary.GetCosmeticItem(data.CosmeticItems[i]); + slots[i].SetItem(itemData); + } + else + slots[i].SetEmpty(); + } + } + } +} diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs.meta new file mode 100644 index 0000000..ef29b8b --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TraderInventoryPanel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 136b0d7ce0d8b1b4f922c823e6a5549c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs new file mode 100644 index 0000000..f00b9c6 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs @@ -0,0 +1,126 @@ +using System.Threading; +using UnityEngine; + +namespace PubNubUnityShowcase.UIComponents +{ + public class TradingView : MonoBehaviour + { + [Header("Components")] + [SerializeField] private OfferPanel offerPanel; + [SerializeField] private ActionButtonsPanel actionButtons; + + [Header("Trader Components")] + [SerializeField] private AvatarPanel initiatorAvatar; + [SerializeField] private TraderInventoryPanel initiatorInventory; + + [Space(10)] + + [SerializeField] private AvatarPanel respondentAvatar; + [SerializeField] private TraderInventoryPanel respondentInventory; + + [Header("Debug")] + //[SerializeField] private Text initiatorNameText; + //[SerializeField] private Text respondentNameText; + private CancellationToken _viewToken; + private TradingViewStateBase _state; + + private TradingViewStateBase State => _state; + + /// + /// Initialize the view + /// + /// All needed data and services + /// Token to cancel all async operations when the view is destroyed + /// The data should include any immutable data (during the whole trading flow) and all the dependency services that this view will need (ex. PNApi instance) + public void Construct(TradingViewData initData, CancellationToken viewToken) + { + _viewToken = viewToken; + + if (initData.State == StateType.initiator) + { + //Setup Flow + UIComponents ui = new UIComponents(offerPanel, initiatorInventory, respondentInventory, initiatorAvatar, respondentAvatar, actionButtons); + var session = initData.Services.Trading.GenerateSessionData(initData.Initiator, initData.Respondent); + _state = new TradingViewStateInitiator(session, initData.Services, ui); + _state.Join(); + _state.CloseViewRequested += OnSelfClose; + } + + if (initData.State == StateType.respondent) + { + //Setup Flow + UIComponents ui = new UIComponents(offerPanel, initiatorInventory, respondentInventory, initiatorAvatar, respondentAvatar, actionButtons); + _state = new TradingViewStateRespondent(initData.Session, initData.InitiatorOffer, initData.Services, ui); + _state.CloseViewRequested += OnSelfClose; + } + } + + public void OnOpenView() + { + //Debug.Log($"View Open"); + } + + /// + /// Close without any network message () + /// + public void OnSelfClose() + { + Dispose(); + Destroy(gameObject); + //Debug.Log($"View Closed"); + } + + private void Dispose() + { + _state.Dispose(); + } + + public enum StateType + { + initiator, + respondent + } + + public class UIComponents + { + public OfferPanel OfferPanel; + public TraderInventoryPanel InventoryInitiator; + public TraderInventoryPanel InventoryRespondent; + public AvatarPanel AvatarInitiator; + public AvatarPanel AvatarRespondent; + public ActionButtonsPanel Actions; + + public UIComponents( + OfferPanel offerPanel, + TraderInventoryPanel initiatorInventory, + TraderInventoryPanel respondentInventory, + AvatarPanel avatarInitiator, + AvatarPanel avatarRespondent, + ActionButtonsPanel actions) + { + OfferPanel = offerPanel; + InventoryInitiator = initiatorInventory; + InventoryRespondent = respondentInventory; + Actions = actions; + AvatarInitiator = avatarInitiator; + AvatarRespondent = avatarRespondent; + } + } + + public class Services + { + public ICosmeticItemLibrary HatsLibrary { get; } + public IAvatarLibrary Avatars { get; } + public ITrading Trading { get; } + public CancellationToken TokenView { get; } + + public Services(ICosmeticItemLibrary hatsLibrary, IAvatarLibrary avatars, ITrading networkTrading, CancellationToken tokenView) + { + HatsLibrary = hatsLibrary; + Avatars = avatars; + Trading = networkTrading; + TokenView = tokenView; + } + } + } +} \ No newline at end of file diff --git a/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs.meta b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs.meta new file mode 100644 index 0000000..16c84b3 --- /dev/null +++ b/Assets/SuperMultiplayerShooter/Scripts/TradingSystem/UIComponents/TradingView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5dbedd8154c39154c9c79635c21a419c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md index 6103451..df13982 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ Welcome to PubNub's Unity Game! This is a Unity game built using the [Super Multiplayer Shooter Unity](https://assetstore.unity.com/packages/templates/systems/super-multiplayer-shooter-template-124977) game, an online shooting brawler game enhanced with the following PubNub real-time functionality: * In-App Messaging: Send and receive messages in the lobby and main menu. -* Presence: Detect when users are online/offline -* Friend List: Add, Remove, and Check when new players come online/offline -* Leaderboard: Update player scores after matches +* Presence: Detect when users are online/offline. +* Friend List: Add, Remove, and Check when new players come online/offline. +* Leaderboard: Update player scores after matches. * Language Translation: Translate your messages to a variety of languages using Message Filters. * Profanity Filtering: Block profane and hateful messages while in-game using Message Filters. * User Metadata: Search and filter for players and view their usernames via App Context. -* Player movement: Send small, ephemeral updates for player movement and state +* Item Trading: Trade hats with your online friends to wear while playing matches. +* Player movement: Send small, ephemeral updates for player movement and state. While this README is focused on the PubNub functionality added to the game, please review Assets > SuperMultiplayerShooter > Guide.pdf. The developers of the original asset have provided detail instructions on how to play the game itself, how to add your own skins/weapons/bullets, and various settings to adjust in the game. @@ -28,7 +29,7 @@ Note: This game is a work in progress, please bear with us whilst we make it awesome. Any issues are a result of our implementation, not a limitation of PubNub :) -- Player trading has not been implemented. The 'trade' button in the friend list will not do anything. +- Player trading has been implemented, but has been to occassionally display the incorrect number of players online in the total player count when users begin trading. Please note that other users online have not been kicked offline and does not affect trading or creating/searching rooms. - Playing the game with players located on different continents can lead to unexpected results, such as characters not respawning. ## Prerequisites @@ -181,12 +182,15 @@ Players can: * Search for other users that have logged into the game by clicking on the magnifying glass search icon. Add them as friends * See the total number of users connected online via the Presence indicator in the top left corner of the screen. * See the Leaderboard statistics in the bottom left of the screen. +* Trade hats with friends -The following files are of focus to review for this scene that pertain to PubNub Functionality. +The following files (or folders of files) are of focus to review for this scene that pertain to PubNub Functionality. - Assets > SuperMultiplayerShooter > Scripts > SampleMainMenu.cs - Assets > SuperMultiplayerShooter > Scripts > ChatSystem.cs - Assets > SuperMultiplayerShooter > Scripts > PubNubManager.cs - Assets > SuperMultiplayerShooter > Scripts > MessageModeration.cs +- Assets > SuperMultiplayerShooter > Scripts > FriendsList +- Assets > SuperMultiplayerShooter > Scripts > TradingSystem ### LoadingScene The Scene that is loaded between the MainMenu and Game Scenes. No PubNub functionality occurs here. @@ -228,6 +232,9 @@ This application uses [PubNub presence state](https://www.pubnub.com/docs/genera An alternative lobby implementation would be to use [PubNub messages](https://www.pubnub.com/docs/general/messages/publish) in conujnction with [message persistence](https://www.pubnub.com/docs/general/storage), so a lobby creator would publish a message in a `lobbies` channel. Other players could read the lobby state by reading the `lobbies` channel history, along with any associated lobby metadata, stored in [message actions](https://www.pubnub.com/docs/general/messages/actions#retrieving-actions). +### Item Trading +The implementation of item trading in this application is deliberately simple. Typically when receiving a trade request, the recipient will be informed through a notification but this demo will instead immediately initiate the trading window and workflow. One limitation of this streamlined approach worth bearing in mind is that the recipient of your trade must be online. + ## License Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.