diff --git a/Assets/Prefabs/PlayerUI.prefab b/Assets/Prefabs/PlayerUI.prefab new file mode 100644 index 0000000..8a9284d --- /dev/null +++ b/Assets/Prefabs/PlayerUI.prefab @@ -0,0 +1,683 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &636093356217172373 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2718635251434518077} + - component: {fileID: 7278490260071256648} + - component: {fileID: 7330093094718640193} + m_Layer: 5 + m_Name: PlayerPosition + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2718635251434518077 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 636093356217172373} + 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: 6150292465518131551} + 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: -629, y: 293} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7278490260071256648 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 636093356217172373} + m_CullTransparentMesh: 1 +--- !u!114 &7330093094718640193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 636093356217172373} + 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: + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + 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_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!1 &3205211927287796582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1273970172547959907} + - component: {fileID: 3512515864430583107} + - component: {fileID: 7955678287927472122} + m_Layer: 5 + m_Name: EmptySpeedometer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1273970172547959907 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3205211927287796582} + 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: 6150292465518131551} + 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: 430, y: -150} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3512515864430583107 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3205211927287796582} + m_CullTransparentMesh: 1 +--- !u!114 &7955678287927472122 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3205211927287796582} + 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: fd17be6cd9f6a3e44840be970946f208, 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 &3270263327541053123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6150292465518131551} + - component: {fileID: 6367027316221171722} + - component: {fileID: 3936046306795667470} + - component: {fileID: 2999972716541400188} + - component: {fileID: 4804863238698135235} + m_Layer: 5 + m_Name: PlayerUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6150292465518131551 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3270263327541053123} + 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: 767112623892183612} + - {fileID: 1273970172547959907} + - {fileID: 7211960240219488103} + - {fileID: 2718635251434518077} + - {fileID: 218548550622008583} + m_Father: {fileID: 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 &6367027316221171722 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3270263327541053123} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &3936046306795667470 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3270263327541053123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &2999972716541400188 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3270263327541053123} + 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!114 &4804863238698135235 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3270263327541053123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 92f3d3903bb620a45936872ab28bb90f, type: 3} + m_Name: + m_EditorClassIdentifier: + fullSpeedometerImage: {fileID: 1176096351768285962} + speedText: {fileID: 789349441782541788} + playerVehicle: {fileID: 0} + maxSpeed: 120 +--- !u!1 &3544012741538123042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 767112623892183612} + - component: {fileID: 4521835500976335881} + - component: {fileID: 1176096351768285962} + m_Layer: 5 + m_Name: FullSpeedometer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &767112623892183612 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3544012741538123042} + 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: 6150292465518131551} + 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: 430, y: -150} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4521835500976335881 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3544012741538123042} + m_CullTransparentMesh: 1 +--- !u!114 &1176096351768285962 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3544012741538123042} + 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: c518c8b8a7532054a8828a794a4ce385, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 0 + m_FillClockwise: 0 + m_FillOrigin: 3 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4393565396899963818 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7211960240219488103} + - component: {fileID: 5236347199554282052} + - component: {fileID: 789349441782541788} + m_Layer: 5 + m_Name: Speed + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7211960240219488103 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4393565396899963818} + 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: 6150292465518131551} + 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: 421, y: -144.9} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5236347199554282052 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4393565396899963818} + m_CullTransparentMesh: 1 +--- !u!114 &789349441782541788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4393565396899963818} + 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: 120V + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4282449151 + m_fontColor: {r: 1, g: 0.9882353, b: 0.2509804, 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: 64 + m_fontSizeBase: 64 + 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_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!1 &4605350590206122513 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 218548550622008583} + - component: {fileID: 4824068769224498465} + - component: {fileID: 5864683024397849957} + m_Layer: 5 + m_Name: LapsCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &218548550622008583 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4605350590206122513} + 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: 6150292465518131551} + 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: 813, y: 293} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4824068769224498465 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4605350590206122513} + m_CullTransparentMesh: 1 +--- !u!114 &5864683024397849957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4605350590206122513} + 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: + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + 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_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} diff --git a/Assets/Prefabs/PlayerUI.prefab.meta b/Assets/Prefabs/PlayerUI.prefab.meta new file mode 100644 index 0000000..fd869c5 --- /dev/null +++ b/Assets/Prefabs/PlayerUI.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9be12878023dc5049b42483815386e6c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/AITrack.unity b/Assets/Scenes/AITrack.unity index 23d6264..1a16ef3 100644 --- a/Assets/Scenes/AITrack.unity +++ b/Assets/Scenes/AITrack.unity @@ -193,81 +193,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} m_PrefabInstance: {fileID: 23063980} m_PrefabAsset: {fileID: 0} ---- !u!1 &39858505 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 39858506} - - component: {fileID: 39858508} - - component: {fileID: 39858507} - m_Layer: 5 - m_Name: EmptySpeedometer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &39858506 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39858505} - 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: 996843409} - 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: 430, y: -150} - m_SizeDelta: {x: 200, y: 200} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &39858507 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39858505} - 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: fd17be6cd9f6a3e44840be970946f208, 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!222 &39858508 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39858505} - m_CullTransparentMesh: 1 --- !u!1001 &41791652 PrefabInstance: m_ObjectHideFlags: 0 @@ -414,142 +339,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} m_PrefabInstance: {fileID: 1903972235} m_PrefabAsset: {fileID: 0} ---- !u!1 &76618634 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 76618635} - - component: {fileID: 76618637} - - component: {fileID: 76618636} - m_Layer: 5 - m_Name: Speed - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &76618635 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 76618634} - 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: 996843409} - 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: 421, y: -144.9} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &76618636 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 76618634} - 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: 120V - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4282449151 - m_fontColor: {r: 1, g: 0.9882353, b: 0.2509804, 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: 64 - m_fontSizeBase: 64 - 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_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 &76618637 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 76618634} - m_CullTransparentMesh: 1 --- !u!4 &85151679 stripped Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} @@ -625,6 +414,17 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 42174ef287c46c342845e8be9f640353, type: 3} +--- !u!114 &149090130 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + m_PrefabInstance: {fileID: 3049190655597787396} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!4 &175717666 stripped Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} @@ -1221,6 +1021,17 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 42174ef287c46c342845e8be9f640353, type: 3} +--- !u!114 &297206498 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + m_PrefabInstance: {fileID: 3049190655597787396} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!4 &408188273 stripped Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} @@ -1320,81 +1131,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 170758284542595608, guid: 42174ef287c46c342845e8be9f640353, type: 3} m_PrefabInstance: {fileID: 921164224} m_PrefabAsset: {fileID: 0} ---- !u!1 &477184587 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 477184590} - - component: {fileID: 477184589} - - component: {fileID: 477184588} - m_Layer: 5 - m_Name: FullSpeedometer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &477184588 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 477184587} - 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: c518c8b8a7532054a8828a794a4ce385, type: 3} - m_Type: 3 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 0 - m_FillClockwise: 0 - m_FillOrigin: 3 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &477184589 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 477184587} - m_CullTransparentMesh: 1 ---- !u!224 &477184590 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 477184587} - 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: 996843409} - 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: 430, y: -150} - m_SizeDelta: {x: 200, y: 200} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1001 &485778946 PrefabInstance: m_ObjectHideFlags: 0 @@ -3153,127 +2889,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 6651bdcbc08f8ed4384fe9587db0f16f, type: 3} ---- !u!1 &996843404 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 996843409} - - component: {fileID: 996843408} - - component: {fileID: 996843407} - - component: {fileID: 996843406} - - component: {fileID: 996843405} - m_Layer: 5 - m_Name: PlayerUI - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &996843405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996843404} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 92f3d3903bb620a45936872ab28bb90f, type: 3} - m_Name: - m_EditorClassIdentifier: - fullSpeedometerImage: {fileID: 477184588} - speedText: {fileID: 76618636} - playerVehicle: {fileID: 1703462595} - maxSpeed: 120 ---- !u!114 &996843406 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996843404} - 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!114 &996843407 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996843404} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &996843408 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996843404} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &996843409 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996843404} - 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: 477184590} - - {fileID: 39858506} - - {fileID: 76618635} - m_Father: {fileID: 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!1001 &1011637585 PrefabInstance: m_ObjectHideFlags: 0 @@ -6507,6 +6122,163 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &3049190655597787396 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 789349441782541788, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontAsset + value: + objectReference: {fileID: 11400000, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 789349441782541788, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_sharedMaterial + value: + objectReference: {fileID: 706495386608451938, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 789349441782541788, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_hasFontAssetChanged + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3270263327541053123, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_Name + value: PlayerUI + objectReference: {fileID: 0} + - target: {fileID: 4804863238698135235, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: playerVehicle + value: + objectReference: {fileID: 1703462595} + - target: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontAsset + value: + objectReference: {fileID: 11400000, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontColor.b + value: 0.2509804 + objectReference: {fileID: 0} + - target: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontColor.g + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_sharedMaterial + value: + objectReference: {fileID: 706495386608451938, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 5864683024397849957, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_hasFontAssetChanged + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6150292465518131551, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7211960240219488103, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -123 + objectReference: {fileID: 0} + - target: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontAsset + value: + objectReference: {fileID: 11400000, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontColor.b + value: 0.2509804 + objectReference: {fileID: 0} + - target: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_fontColor.g + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_sharedMaterial + value: + objectReference: {fileID: 706495386608451938, guid: 978007a8ddca8ef408c6e3469f9496d1, type: 2} + - target: {fileID: 7330093094718640193, guid: 9be12878023dc5049b42483815386e6c, type: 3} + propertyPath: m_hasFontAssetChanged + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9be12878023dc5049b42483815386e6c, type: 3} --- !u!1001 &6388558628322318749 PrefabInstance: m_ObjectHideFlags: 0 @@ -6780,6 +6552,17 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: dd7b06eb9076d6c429cee20c704cae64, type: 3} +--- !u!114 &6388558628322318750 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7105996084223619230, guid: dd7b06eb9076d6c429cee20c704cae64, type: 3} + m_PrefabInstance: {fileID: 6388558628322318749} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1703462595} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 80f1410edd2d20447b553914aa3c9c7f, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &6682387771288872990 PrefabInstance: m_ObjectHideFlags: 0 @@ -6836,6 +6619,22 @@ PrefabInstance: propertyPath: finishLine value: objectReference: {fileID: 1535149051} + - target: {fileID: 8956791611276861029, guid: 3d3c243c1b15b8d47b49111dee600ae6, type: 3} + propertyPath: lapsLeftText + value: + objectReference: {fileID: 297206498} + - target: {fileID: 8956791611276861029, guid: 3d3c243c1b15b8d47b49111dee600ae6, type: 3} + propertyPath: playerVehicle + value: + objectReference: {fileID: 1703462595} + - target: {fileID: 8956791611276861029, guid: 3d3c243c1b15b8d47b49111dee600ae6, type: 3} + propertyPath: playerProgress + value: + objectReference: {fileID: 6388558628322318750} + - target: {fileID: 8956791611276861029, guid: 3d3c243c1b15b8d47b49111dee600ae6, type: 3} + propertyPath: playerPositionText + value: + objectReference: {fileID: 149090130} - target: {fileID: 8956791611276861029, guid: 3d3c243c1b15b8d47b49111dee600ae6, type: 3} propertyPath: numberOfCheckpoints value: 52 @@ -6853,7 +6652,7 @@ SceneRoots: - {fileID: 1746292610} - {fileID: 6388558628322318749} - {fileID: 575325056} - - {fileID: 996843409} + - {fileID: 3049190655597787396} - {fileID: 2141142287} - {fileID: 2140683070} - {fileID: 860760551} diff --git a/Assets/Scripts/Kart/AIHovercarController.cs b/Assets/Scripts/Kart/AIHovercarController.cs index 660c239..2836f89 100644 --- a/Assets/Scripts/Kart/AIHovercarController.cs +++ b/Assets/Scripts/Kart/AIHovercarController.cs @@ -1,6 +1,6 @@ using UnityEngine; -public class AIHovercarController : MonoBehaviour +public class AIHovercarController : BaseHovercarController { [Header("Hover Settings")] public float hoverHeight = 3.0f; @@ -15,8 +15,6 @@ public class AIHovercarController : MonoBehaviour public float rotationSpeed = 100.0f; [Header("Checkpoint Navigation")] - [Tooltip("Ordered list of checkpoints for the AI to follow.")] - public Transform[] checkpoints; [Tooltip("Distance from a checkpoint at which the AI switches to the next one.")] public float checkpointThreshold = 5.0f; private int currentCheckpointIndex = 0; diff --git a/Assets/Scripts/Kart/BaseHovercarController.cs b/Assets/Scripts/Kart/BaseHovercarController.cs new file mode 100644 index 0000000..cdf24ea --- /dev/null +++ b/Assets/Scripts/Kart/BaseHovercarController.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +public class BaseHovercarController : MonoBehaviour +{ + + [Tooltip("Ordered list of checkpoints for the AI to follow.")] + public Transform[] checkpoints; +} \ No newline at end of file diff --git a/Assets/Scripts/Kart/BaseHovercarController.cs.meta b/Assets/Scripts/Kart/BaseHovercarController.cs.meta new file mode 100644 index 0000000..6d422ab --- /dev/null +++ b/Assets/Scripts/Kart/BaseHovercarController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 04ca3f236c4b2104592b684143a3c461 \ No newline at end of file diff --git a/Assets/Scripts/Kart/HovercarController.cs b/Assets/Scripts/Kart/HovercarController.cs index 453d3f3..4b45ca1 100644 --- a/Assets/Scripts/Kart/HovercarController.cs +++ b/Assets/Scripts/Kart/HovercarController.cs @@ -1,6 +1,6 @@ using UnityEngine; -public class StableHovercarController : MonoBehaviour +public class StableHovercarController : BaseHovercarController { [Header("Hover Settings")] public float hoverHeight = 3.0f; @@ -17,8 +17,6 @@ public class StableHovercarController : MonoBehaviour [Header("Reset Settings")] [Tooltip("Time (in seconds) without track contact before resetting the vehicle.")] public float timeBeforeReset = 3.0f; - // Checkpoints are used to reposition the vehicle. - public Transform[] checkpoints; [Header("Track Orientation Settings")] [Tooltip("Distance to search downward for track (used to align the vehicle’s bottom).")] diff --git a/Assets/Scripts/RaceGameManager/FinishLine.cs b/Assets/Scripts/RaceGameManager/FinishLine.cs index c36755a..d3b1f0f 100644 --- a/Assets/Scripts/RaceGameManager/FinishLine.cs +++ b/Assets/Scripts/RaceGameManager/FinishLine.cs @@ -7,6 +7,14 @@ public class FinishLine : MonoBehaviour RacerProgress progress = other.GetComponent(); if (progress != null && RaceManager.Instance != null) { + // Increment lap count and reset checkpoint index + if (progress.currentCheckpointIndex == other.GetComponent().checkpoints.Length) + { + progress.lapCount++; + progress.currentCheckpointIndex = 0; + } + + RaceManager.Instance.CheckFinish(progress); } } diff --git a/Assets/Scripts/RaceGameManager/RaceManager.cs b/Assets/Scripts/RaceGameManager/RaceManager.cs index 839e3ca..44d6461 100644 --- a/Assets/Scripts/RaceGameManager/RaceManager.cs +++ b/Assets/Scripts/RaceGameManager/RaceManager.cs @@ -1,4 +1,5 @@ using UnityEngine; +using TMPro; // Import TextMeshPro namespace using System.Collections.Generic; public class RaceManager : MonoBehaviour @@ -9,19 +10,30 @@ public class RaceManager : MonoBehaviour [Tooltip("Total number of laps needed to finish the race.")] public int totalLaps = 3; [Tooltip("Total number of checkpoints in the race.")] - public int numberOfCheckpoints = 0; // Set this in the Inspector to match your track setup + public int numberOfCheckpoints = 0; [Header("Finish Line Settings")] [Tooltip("Assign the finish line object (with a trigger collider) here.")] public Transform finishLine; + [Header("UI Elements")] + [Tooltip("Assign the Text UI component to display player's position.")] + public TextMeshProUGUI playerPositionText; + + [Tooltip("Assign the Text UI component to display laps left.")] + public TextMeshProUGUI lapsLeftText; + + [Tooltip("Reference to the player's vehicle.")] + public GameObject playerVehicle; + private List racers = new List(); public bool raceFinished = false; public string winnerName = ""; + private RacerProgress playerProgress; + void Awake() { - // Basic singleton setup. if (Instance == null) Instance = this; else @@ -30,35 +42,75 @@ public class RaceManager : MonoBehaviour void Start() { - // Optionally, automatically find all racers by tag. GameObject[] racerObjects = GameObject.FindGameObjectsWithTag("Racer"); foreach (GameObject racer in racerObjects) { RacerProgress progress = racer.GetComponent(); if (progress != null) + { racers.Add(progress); + } } + + if (playerVehicle != null) { + playerProgress = playerVehicle.GetComponent(); + } + + // Initialize UI + if (playerProgress != null) + UpdateLapsLeftUI(); } - /// - /// Returns the highest “progress value” among all racers. - /// (Calculated as: lap count * numberOfCheckpoints + current checkpoint index.) - /// - public float GetLeaderProgress() + void Update() { - float leaderProgress = 0f; - foreach (RacerProgress rp in racers) + if (playerProgress != null) { - float progressValue = rp.lapCount * numberOfCheckpoints + rp.currentCheckpointIndex; - if (progressValue > leaderProgress) - leaderProgress = progressValue; + int playerPosition = GetPlayerPosition(); + UpdatePositionUI(playerPosition); + UpdateLapsLeftUI(); // Continuously update the lap counter } - return leaderProgress; } /// - /// Call this when a racer crosses the finish line. + /// Returns the player's current position among all racers. /// + private int GetPlayerPosition() + { + racers.Sort((r1, r2) => GetRacerProgressValue(r2).CompareTo(GetRacerProgressValue(r1))); + + for (int i = 0; i < racers.Count; i++) + { + if (racers[i] == playerProgress) + return i + 1; // Position is 1-based + } + return racers.Count; + } + + /// + /// Updates the UI element to show the player's current race position. + /// + private void UpdatePositionUI(int position) + { + playerPositionText.text = position + "/" + racers.Count; + } + + /// + /// Updates the laps left UI element based on the player's current progress. + /// + private void UpdateLapsLeftUI() + { + int lapsLeft = Mathf.Max(totalLaps - playerProgress.lapCount, 0); + lapsLeftText.text = "Laps Left: " + lapsLeft; + } + + /// + /// Calculates the progress value for a racer based on laps and checkpoints. + /// + private float GetRacerProgressValue(RacerProgress rp) + { + return rp.lapCount * numberOfCheckpoints + rp.currentCheckpointIndex; + } + public void CheckFinish(RacerProgress rp) { if (rp.lapCount >= totalLaps && !raceFinished) @@ -66,7 +118,6 @@ public class RaceManager : MonoBehaviour raceFinished = true; winnerName = rp.gameObject.name; Debug.Log("Race Finished! Winner: " + winnerName); - // Here you might trigger UI updates, stop all racers, etc. } } }