diff --git a/Assets/Prefabs/Input/Player.prefab b/Assets/Prefabs/Input/Player.prefab index 0db9dad33..cfeb4eb87 100644 --- a/Assets/Prefabs/Input/Player.prefab +++ b/Assets/Prefabs/Input/Player.prefab @@ -444,9 +444,10 @@ MonoBehaviour: collisionMask: serializedVersion: 2 m_Bits: 1 - initialTarget: {fileID: 8159248892074053650} maxRadius: 5 minRadius: 1 + collisionOffset: 0.3 + InputManager: {fileID: 0} --- !u!1 &345906872987025452 GameObject: m_ObjectHideFlags: 0 @@ -819,8 +820,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 400, y: -101.49999} - m_SizeDelta: {x: 800, y: 202.99998} + m_AnchoredPosition: {x: 400, y: -262.97498} + m_SizeDelta: {x: 800, y: 54.01} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7635802516270352685 CanvasRenderer: @@ -916,7 +917,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_hasFontAssetChanged: 1 + m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &1029316632486890240 @@ -931,7 +932,7 @@ GameObject: - component: {fileID: 1053768020010034934} - component: {fileID: 4217260705503384286} m_Layer: 5 - m_Name: Panel + m_Name: DeathScreen m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -951,12 +952,13 @@ RectTransform: m_Children: - {fileID: 3979042202783429034} - {fileID: 7160418593272683629} + - {fileID: 1728485695698972904} m_Father: {fileID: 3570743071879246586} m_RootOrder: -1 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_AnchoredPosition: {x: -0.64001465, y: -0.27001953} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1053768020010034934 @@ -983,11 +985,11 @@ MonoBehaviour: m_Left: 0 m_Right: 0 m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 4 - m_Spacing: 20 + m_Bottom: 10 + m_ChildAlignment: 7 + m_Spacing: 0 m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 + m_ChildForceExpandHeight: 0 m_ChildControlWidth: 1 m_ChildControlHeight: 1 m_ChildScaleWidth: 0 @@ -1232,6 +1234,276 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &1814435239052256991 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1728485695698972904} + - component: {fileID: 8927416973606899725} + - component: {fileID: 5812129328713847385} + m_Layer: 5 + m_Name: PressJumpOrFireToSpectate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1728485695698972904 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814435239052256991} + 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: 1664387495115092571} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 399.99997, y: -412.995} + m_SizeDelta: {x: 799.99994, y: 54.01} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8927416973606899725 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814435239052256991} + m_CullTransparentMesh: 1 +--- !u!114 &5812129328713847385 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814435239052256991} + 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: Press JUMP or FIRE to spectate + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: aa99fff0688574ba78204625170fa6e0, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: a5dba56b90a3ca6978a283b93ad4fe3f, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 45 + m_fontSizeBase: 45 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 1024 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &1921760066322737488 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 467653906061960658} + - component: {fileID: 3889731707358076327} + - component: {fileID: 9057776257661472469} + m_Layer: 5 + m_Name: SpectatingText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &467653906061960658 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1921760066322737488} + 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: 3923473787945375206} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 400, y: -359.985} + m_SizeDelta: {x: 800, y: 36.01} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3889731707358076327 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1921760066322737488} + m_CullTransparentMesh: 1 +--- !u!114 &9057776257661472469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1921760066322737488} + 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: NOW SPECTATING + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: aa99fff0688574ba78204625170fa6e0, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: a5dba56b90a3ca6978a283b93ad4fe3f, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 30 + m_fontSizeBase: 30 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 1024 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &3099507315220960622 GameObject: m_ObjectHideFlags: 0 @@ -1373,6 +1645,7 @@ RectTransform: - {fileID: 1417967732049705392} - {fileID: 4777486860895138767} - {fileID: 4412023050163012269} + - {fileID: 3923473787945375206} m_Father: {fileID: 71015680234268071} m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1407,6 +1680,9 @@ MonoBehaviour: chipAmount: {fileID: 5281579252922457437} deathScreen: {fileID: 1029316632486890240} deathText: {fileID: 9172283963218471322} + spectateHintText: {fileID: 5812129328713847385} + spectatorScreen: {fileID: 3733497246552528051} + spectatorTargetText: {fileID: 5857550089673397807} damageBorderFlashDuration: 0.2 popupSpammer: {fileID: 6535424167945181997} speedLines: {fileID: 1712702864845135441} @@ -1675,6 +1951,80 @@ SortingGroup: m_SortingLayer: 0 m_SortingOrder: 1 m_SortAtRoot: 0 +--- !u!1 &3733497246552528051 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3923473787945375206} + - component: {fileID: 6572560185364608883} + - component: {fileID: 5192613946662590301} + m_Layer: 5 + m_Name: SpectatorScreen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &3923473787945375206 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3733497246552528051} + 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: 467653906061960658} + - {fileID: 1109814868373793313} + m_Father: {fileID: 3570743071879246586} + m_RootOrder: -1 + 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 &6572560185364608883 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3733497246552528051} + m_CullTransparentMesh: 1 +--- !u!114 &5192613946662590301 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3733497246552528051} + 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: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &4536483048541249167 GameObject: m_ObjectHideFlags: 0 @@ -1928,6 +2278,141 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: initialRotation: {x: 90, y: 45, z: 0} +--- !u!1 &5306419288491005772 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1109814868373793313} + - component: {fileID: 5444899780004193865} + - component: {fileID: 5857550089673397807} + m_Layer: 5 + m_Name: NameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1109814868373793313 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5306419288491005772} + 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: 3923473787945375206} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 400, y: -413.995} + m_SizeDelta: {x: 800, y: 72.01} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5444899780004193865 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5306419288491005772} + m_CullTransparentMesh: 1 +--- !u!114 &5857550089673397807 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5306419288491005772} + 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: PLAYER NAME + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: aa99fff0688574ba78204625170fa6e0, type: 2} + m_sharedMaterial: {fileID: 7168929159514863053, guid: aa99fff0688574ba78204625170fa6e0, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 60 + m_fontSizeBase: 60 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &5383401622834221329 GameObject: m_ObjectHideFlags: 0 @@ -2608,8 +3093,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 400, y: -336.49997} - m_SizeDelta: {x: 800, y: 226.99998} + m_AnchoredPosition: {x: 400, y: -337.985} + m_SizeDelta: {x: 800, y: 96.01} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2342692913438697671 CanvasRenderer: @@ -2642,7 +3127,7 @@ MonoBehaviour: m_text: BLUE m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: aa99fff0688574ba78204625170fa6e0, type: 2} - m_sharedMaterial: {fileID: -9072920058959301574, guid: d92f5c8d18e777e438cc7641fb4b8324, type: 2} + m_sharedMaterial: {fileID: 7168929159514863053, guid: aa99fff0688574ba78204625170fa6e0, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -2705,7 +3190,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_hasFontAssetChanged: 1 + m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &8520497311913013443 @@ -3327,8 +3812,3 @@ Transform: m_CorrespondingSourceObject: {fileID: 9050520059004703615, guid: 27ac4408b426ae745a1792dde18c79ba, type: 3} m_PrefabInstance: {fileID: 3287810421515891185} m_PrefabAsset: {fileID: 0} ---- !u!4 &8159248892074053650 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 6673173064753799651, guid: 27ac4408b426ae745a1792dde18c79ba, type: 3} - m_PrefabInstance: {fileID: 3287810421515891185} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/UI/LoadingScreen.prefab b/Assets/Prefabs/UI/LoadingScreen.prefab index 04f9191d1..ffe73abbb 100644 --- a/Assets/Prefabs/UI/LoadingScreen.prefab +++ b/Assets/Prefabs/UI/LoadingScreen.prefab @@ -1336,7 +1336,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2576682853555585358 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Control&Input/OrbitCamera.cs b/Assets/Scripts/Control&Input/OrbitCamera.cs index 290267280..d916effa2 100644 --- a/Assets/Scripts/Control&Input/OrbitCamera.cs +++ b/Assets/Scripts/Control&Input/OrbitCamera.cs @@ -9,10 +9,10 @@ public class OrbitCamera : MonoBehaviour { [SerializeField] private LayerMask cullingMask; [SerializeField] private LayerMask collisionMask; - [SerializeField] private Transform initialTarget; [SerializeField] private float maxRadius = 5; [SerializeField] private float minRadius = 1; [SerializeField] private float collisionOffset = .3f; + [SerializeField] private float lookSensitivity = 5; public InputManager InputManager; @@ -24,7 +24,7 @@ public Camera Camera set { camera = value; - camera.cullingMask = cullingMask; + camera.cullingMask = cullingMask | (1 << (12 + player.LayerIndex)); cameraTransform = value.transform; } } @@ -37,9 +37,11 @@ public Camera Camera private PlayerManager[] otherPlayers; private int targetIndex = 0; + private PlayerManager player; private void Start() { + player = GetComponent(); if (MatchController.Singleton) MatchController.Singleton.onRoundEnd += StopTracking; } @@ -56,7 +58,7 @@ private void OnDestroy() public void Activate() { - StartTracking(initialTarget); + StartTracking(player); if (!MatchController.Singleton.IsRoundInProgress) return; otherPlayers = MatchController.Singleton.Players.Where(p => p != GetComponent()).ToArray(); @@ -65,10 +67,18 @@ public void Activate() private IEnumerator WaitAndStopTrackingRagdoll() { - yield return new WaitForSeconds(7f); - StopTracking(); - GetComponent().HUDController.HideDeathScreen(); + yield return new WaitForSeconds(3f); + player.HUDController.DisplaySpectateHint(); InputManager.onSelect += SwitchTarget; + InputManager.onFirePerformed += SwitchTarget; + yield return new WaitForSeconds(3f); + var isStillOnPlayer = target = player.AiAimSpot; + if (isStillOnPlayer) + { + StopTracking(); + // Will focus on next player next time + targetIndex = 1; + } } private void SwitchTarget(InputAction.CallbackContext ctx) @@ -76,21 +86,24 @@ private void SwitchTarget(InputAction.CallbackContext ctx) if (!MatchController.Singleton.IsRoundInProgress) return; - if (targetIndex >= otherPlayers.Length) + // 0 is a special index, and the remainder is i+1 so we can safely subtract. + if (targetIndex == 0) StopTracking(); else - StartTracking(otherPlayers[targetIndex].AiAimSpot); + StartTracking(otherPlayers[targetIndex - 1]); targetIndex = (targetIndex + 1) % (otherPlayers.Length + 1); } - private void StartTracking(Transform nextTarget) + private void StartTracking(PlayerManager nextTarget) { if (!cameraTransform || !InputManager || !MatchController.Singleton.IsRoundInProgress) return; isTracking = true; camera.enabled = true; - target = nextTarget; + target = nextTarget.AiAimSpot; + if (nextTarget != player) + player.HUDController.DisplaySpectatorScreen(nextTarget.identity); } private void StopTracking() @@ -115,7 +128,7 @@ private void UpdateAngles() var lookInput = InputManager.IsMouseAndKeyboard ? InputManager.lookInput : InputManager.lookInput * Time.deltaTime; - aimAngle += lookInput * 10; // TODO idk set this properly + aimAngle += lookInput * lookSensitivity; // TODO idk set this properly aimAngle = aimAngle.ClampedLookAngles(); } diff --git a/Assets/Scripts/Gamestate/PlayerManager.cs b/Assets/Scripts/Gamestate/PlayerManager.cs index 46f619c73..6c616d67e 100644 --- a/Assets/Scripts/Gamestate/PlayerManager.cs +++ b/Assets/Scripts/Gamestate/PlayerManager.cs @@ -3,7 +3,6 @@ using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.Rendering.Universal; -using UnityEngine.Serialization; [RequireComponent(typeof(PlayerMovement))] [RequireComponent(typeof(AudioSource))] @@ -21,6 +20,9 @@ public class PlayerManager : NetworkBehaviour private const int defaultLayer = 1; public int HitMask => hitMask; + private int layerIndex; + public int LayerIndex => layerIndex; + [SerializeField] private LayerMask interactMask; @@ -400,6 +402,7 @@ private void ScreenShake(GunStats stats) public virtual void SetLayer(int playerIndex) { + layerIndex = playerIndex; int playerLayer = LayerMask.NameToLayer("Player " + playerIndex); // Set layers for the camera to ignore (the other players' gun layers, and this layer) diff --git a/Assets/Scripts/UI/PlayerHUDController.cs b/Assets/Scripts/UI/PlayerHUDController.cs index 3b84c0e20..bc585600c 100644 --- a/Assets/Scripts/UI/PlayerHUDController.cs +++ b/Assets/Scripts/UI/PlayerHUDController.cs @@ -2,6 +2,7 @@ using UnityEngine.UI; using System.Linq; using TMPro; +using UnityEngine.Serialization; public class PlayerHUDController : MonoBehaviour { @@ -63,6 +64,15 @@ public class PlayerHUDController : MonoBehaviour [SerializeField] private TMP_Text deathText; + [SerializeField] + private TMP_Text spectateHintText; + + [SerializeField] + private GameObject spectatorScreen; + + [SerializeField] + private TMP_Text spectatorTargetText; + [SerializeField] private float damageBorderFlashDuration = .2f; @@ -281,13 +291,22 @@ public void DisplayDeathScreen(PlayerIdentity killer) deathText.text = killer.playerName; deathText.color = killer.color; deathScreen.SetActive(true); + spectateHintText.gameObject.SetActive(false); ammoHud.parent.gameObject.SetActive(false); speedLines.gameObject.SetActive(false); } - public void HideDeathScreen() + public void DisplaySpectateHint() + { + spectateHintText.gameObject.SetActive(true); + } + + public void DisplaySpectatorScreen(PlayerIdentity target) { deathScreen.SetActive(false); + spectatorScreen.SetActive(true); + spectatorTargetText.text = target.playerName; + spectatorTargetText.color = target.color; } // x and y expected to be in range [-1, 1]