Add a user search menu
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -119,6 +119,160 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &11907295
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 11907296}
|
||||
- component: {fileID: 11907299}
|
||||
- component: {fileID: 11907298}
|
||||
- component: {fileID: 11907297}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &11907296
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11907295}
|
||||
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: 1633098166}
|
||||
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 &11907297
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11907295}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 9
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!114 &11907298
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11907295}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: User Search
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 26
|
||||
m_fontSizeBase: 26
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &11907299
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11907295}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &40776219
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -385,9 +539,9 @@ RectTransform:
|
||||
- {fileID: 2073047664}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: -137.5, y: -99.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 125, y: -237.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &62990861
|
||||
@@ -1718,9 +1872,9 @@ RectTransform:
|
||||
- {fileID: 1519454017}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: 137.5, y: -99.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -237.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &475356129
|
||||
@@ -2541,9 +2695,9 @@ RectTransform:
|
||||
- {fileID: 426080293}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: -275, y: 100.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 125, y: -37.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &914456585
|
||||
@@ -2693,9 +2847,9 @@ RectTransform:
|
||||
- {fileID: 1995409476}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: 275, y: 100.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 675, y: -37.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &949127460
|
||||
@@ -3325,6 +3479,7 @@ RectTransform:
|
||||
- {fileID: 2038556860}
|
||||
- {fileID: 62990860}
|
||||
- {fileID: 475356128}
|
||||
- {fileID: 1633098166}
|
||||
m_Father: {fileID: 1263503583}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
@@ -4605,9 +4760,9 @@ RectTransform:
|
||||
- {fileID: 1968955086}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: -275, y: 0.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 125, y: -137.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1572234421
|
||||
@@ -4919,6 +5074,158 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1610381516}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1633098165
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1633098166}
|
||||
- component: {fileID: 1633098171}
|
||||
- component: {fileID: 1633098170}
|
||||
- component: {fileID: 1633098169}
|
||||
- component: {fileID: 1633098168}
|
||||
- component: {fileID: 1633098167}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1633098166
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
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: 11907296}
|
||||
m_Father: {fileID: 1266243668}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 675, y: -237.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1633098167
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 2
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!114 &1633098168
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1a45465fc8803364d968dc6bec70fca8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sceneName: UserSearchMenu
|
||||
--- !u!114 &1633098169
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
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: 1633098170}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &1633098170
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
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!222 &1633098171
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1633098165}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1657120007
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5154,9 +5461,9 @@ RectTransform:
|
||||
- {fileID: 40776220}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: 100.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -37.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1777696996
|
||||
@@ -6319,9 +6626,9 @@ RectTransform:
|
||||
- {fileID: 263297569}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -137.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1997401229
|
||||
@@ -6613,9 +6920,9 @@ RectTransform:
|
||||
- {fileID: 1657120008}
|
||||
m_Father: {fileID: 1266243668}
|
||||
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: 275, y: 0.5}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 675, y: -137.5}
|
||||
m_SizeDelta: {x: 250, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2038556861
|
||||
|
||||
2949
Assets/Scenes/UserSearchMenu.unity
Normal file
2949
Assets/Scenes/UserSearchMenu.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/UserSearchMenu.unity.meta
Normal file
7
Assets/Scenes/UserSearchMenu.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9824037642dab4ad5bcf9be82d6c3f4d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
39
Assets/Scripts/Types/Account.cs
Normal file
39
Assets/Scripts/Types/Account.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
[Preserve]
|
||||
public class Account
|
||||
{
|
||||
[Preserve]
|
||||
[JsonProperty("id")]
|
||||
public BigInteger UserID { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("username")]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("icon")]
|
||||
public int Icon { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("overlay")]
|
||||
public int Overlay { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("birdColor")]
|
||||
public int[] BirdColor { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("overlayColor")]
|
||||
public int[] OverlayColor { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("customIcon")]
|
||||
public string CustomIcon { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("stats")]
|
||||
public Stats Stats { get; set; }
|
||||
}
|
||||
2
Assets/Scripts/Types/Account.cs.meta
Normal file
2
Assets/Scripts/Types/Account.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98be53ab03e46424096c025c9dafd0eb
|
||||
47
Assets/Scripts/Types/Stats.cs
Normal file
47
Assets/Scripts/Types/Stats.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
[Preserve]
|
||||
public class Stats
|
||||
{
|
||||
[Preserve]
|
||||
[JsonProperty("highScore")]
|
||||
public BigInteger HighScore { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalNormalBerries")]
|
||||
public BigInteger TotalNormalBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalPoisonBerries")]
|
||||
public BigInteger TotalPoisonBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalSlowBerries")]
|
||||
public BigInteger TotalSlowBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalUltraBerries")]
|
||||
public BigInteger TotalUltraBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalSpeedyBerries")]
|
||||
public BigInteger TotalSpeedyBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalCoinBerries")]
|
||||
public BigInteger TotalCoinBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalRandomBerries")]
|
||||
public BigInteger TotalRandomBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("totalAntiBerries")]
|
||||
public BigInteger TotalAntiBerries { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("coins")]
|
||||
public BigInteger Coins { get; set; }
|
||||
}
|
||||
2
Assets/Scripts/Types/Stats.cs.meta
Normal file
2
Assets/Scripts/Types/Stats.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdfa01999e81b4974b97832cf44a3784
|
||||
107
Assets/Scripts/UserSearchMenu.cs
Normal file
107
Assets/Scripts/UserSearchMenu.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UserSearchMenu : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject content;
|
||||
[SerializeField] private GameObject sampleObject;
|
||||
[SerializeField] private Button searchButton;
|
||||
[SerializeField] private TMP_InputField usernameInput;
|
||||
[SerializeField] private TMP_Text statusText;
|
||||
[SerializeField] private ProfileMenu profilePrefab;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
usernameInput.onSelect.AddListener((_) => usernameInput.caretPosition = usernameInput.text.Length);
|
||||
searchButton.onClick.AddListener(Search);
|
||||
Search();
|
||||
}
|
||||
|
||||
async void Search()
|
||||
{
|
||||
searchButton.interactable = false;
|
||||
foreach (Transform item in content.transform)
|
||||
if (item.gameObject.activeSelf)
|
||||
Destroy(item.gameObject);
|
||||
using UnityWebRequest request = UnityWebRequest.Get(Endpoints.BD_ACCOUNT_ENDPOINT + "?username=" + usernameInput.text);
|
||||
request.SetRequestHeader("Requester", "BerryDashClient");
|
||||
request.SetRequestHeader("ClientVersion", Application.version);
|
||||
request.SetRequestHeader("ClientPlatform", Application.platform.ToString());
|
||||
await request.SendWebRequest();
|
||||
if (request.downloadHandler.text == null)
|
||||
{
|
||||
searchButton.interactable = true;
|
||||
UpdateStatus(true, "Failed to get a list of users");
|
||||
return;
|
||||
}
|
||||
UpdateStatus(false);
|
||||
var jsonResponse = JObject.Parse(request.downloadHandler.text);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
foreach (var entry in jsonResponse["data"].ToObject<Account[]>())
|
||||
{
|
||||
if (entry.UserID == BazookaManager.Instance.GetAccountID()) continue;
|
||||
var entryInfo = Instantiate(sampleObject, content.transform);
|
||||
var playerIcon = entryInfo.transform.GetChild(0).GetComponent<Image>();
|
||||
var playerOverlay = playerIcon.transform.GetChild(0).GetComponent<Image>();
|
||||
var usernameText = entryInfo.transform.GetChild(1).GetComponent<TMP_Text>();
|
||||
var playerIconButton = playerIcon.GetComponent<Button>();
|
||||
var highScoreText = entryInfo.transform.GetChild(2).GetComponent<TMP_Text>();
|
||||
|
||||
usernameText.text = entry.Username;
|
||||
highScoreText.text += Tools.FormatWithCommas(entry.Stats.HighScore);
|
||||
|
||||
if (entry.CustomIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + entry.Icon);
|
||||
if (entry.Icon == 1) playerIcon.sprite = Tools.GetIconForUser(entry.UserID);
|
||||
playerOverlay.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + entry.Overlay);
|
||||
if (entry.Overlay != 0) playerOverlay.gameObject.SetActive(true);
|
||||
if (entry.Overlay == 8) playerOverlay.transform.localPosition = new Vector2(-16.56f, 14.81f);
|
||||
else if (entry.Overlay == 11) playerOverlay.transform.localPosition = new Vector2(-14.74451f, 20.39122f);
|
||||
else if (entry.Overlay == 13) playerOverlay.transform.localPosition = new Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color(entry.BirdColor[0] / 255f, entry.BirdColor[1] / 255f, entry.BirdColor[2] / 255f);
|
||||
playerOverlay.color = new Color(entry.BirdColor[0] / 255f, entry.BirdColor[1] / 255f, entry.BirdColor[2] / 255f);
|
||||
}
|
||||
catch
|
||||
{
|
||||
playerIcon.color = Color.white;
|
||||
playerOverlay.color = Color.white;
|
||||
}
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = entry.CustomIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
clone.SetActive(true);
|
||||
await clone.GetComponent<ProfileMenu>().Init(entry.UserID);
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateStatus(true, (string)jsonResponse["message"]);
|
||||
}
|
||||
searchButton.interactable = true;
|
||||
}
|
||||
|
||||
async void Update()
|
||||
{
|
||||
if (Keyboard.current.escapeKey.wasPressedThisFrame) await SceneManager.LoadSceneAsync("MainMenu");
|
||||
}
|
||||
|
||||
private void UpdateStatus(bool enabled, string message = "")
|
||||
{
|
||||
statusText.gameObject.SetActive(enabled);
|
||||
statusText.text = message;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UserSearchMenu.cs.meta
Normal file
2
Assets/Scripts/UserSearchMenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c6d4c7b82c4d401996b55734bbe5b65
|
||||
@@ -41,6 +41,9 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/StatsMenu.unity
|
||||
guid: 7fc772dfc5233442ebeceac3db878727
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/UserSearchMenu.unity
|
||||
guid: 9824037642dab4ad5bcf9be82d6c3f4d
|
||||
m_configObjects:
|
||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||
m_UseUCBPForAssetBundles: 0
|
||||
|
||||
Reference in New Issue
Block a user