From 2b875bebbf877bcbf4bf8e5752cde7371cf18f20 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sun, 6 Dec 2020 18:33:36 +0100 Subject: [PATCH] Score & HP HUD --- Assembly-CSharp.csproj | 2 + Assets/Prefabs/Health.prefab | 76 ++ Assets/Prefabs/Health.prefab.meta | 7 + Assets/Scenes/Main.unity | 971 +++++++++++++++++++++++ Assets/Scripts/EnemyController.cs | 6 +- Assets/Scripts/HUDManager.cs | 25 + Assets/Scripts/HUDManager.cs.meta | 11 + Assets/Scripts/OwnCharacterController.cs | 16 +- Assets/Scripts/ScoreSystem.cs | 16 + Assets/Scripts/ScoreSystem.cs.meta | 11 + Assets/Sprites/hud_heartEmpty.png | Bin 0 -> 1109 bytes Assets/Sprites/hud_heartEmpty.png.meta | 92 +++ Assets/Sprites/hud_heartFull.png | Bin 0 -> 1153 bytes Assets/Sprites/hud_heartFull.png.meta | 92 +++ Assets/Sprites/hud_heartHalf.png | Bin 0 -> 1365 bytes Assets/Sprites/hud_heartHalf.png.meta | 92 +++ 16 files changed, 1414 insertions(+), 3 deletions(-) create mode 100644 Assets/Prefabs/Health.prefab create mode 100644 Assets/Prefabs/Health.prefab.meta create mode 100644 Assets/Scripts/HUDManager.cs create mode 100644 Assets/Scripts/HUDManager.cs.meta create mode 100644 Assets/Scripts/ScoreSystem.cs create mode 100644 Assets/Scripts/ScoreSystem.cs.meta create mode 100644 Assets/Sprites/hud_heartEmpty.png create mode 100644 Assets/Sprites/hud_heartEmpty.png.meta create mode 100644 Assets/Sprites/hud_heartFull.png create mode 100644 Assets/Sprites/hud_heartFull.png.meta create mode 100644 Assets/Sprites/hud_heartHalf.png create mode 100644 Assets/Sprites/hud_heartHalf.png.meta diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index bbeb099..8fe04bb 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -59,11 +59,13 @@ + + diff --git a/Assets/Prefabs/Health.prefab b/Assets/Prefabs/Health.prefab new file mode 100644 index 0000000..00b5c5c --- /dev/null +++ b/Assets/Prefabs/Health.prefab @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2830966423841907188 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4752281081059304708} + - component: {fileID: 440502246605181763} + - component: {fileID: 4716129239565611745} + m_Layer: 5 + m_Name: Health1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4752281081059304708 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2830966423841907188} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -255.69, y: 58} + m_SizeDelta: {x: -571.4448, y: -267.6005} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &440502246605181763 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2830966423841907188} + m_CullTransparentMesh: 0 +--- !u!114 &4716129239565611745 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2830966423841907188} + 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_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 4cd54486a573771ffa6ddb648338eabb, type: 3} + m_Type: 3 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/Prefabs/Health.prefab.meta b/Assets/Prefabs/Health.prefab.meta new file mode 100644 index 0000000..7ef43dc --- /dev/null +++ b/Assets/Prefabs/Health.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8992dd160b6b3c0adbad55ef9ea1d06f +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index acd555d..c4e560c 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -121,6 +121,245 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!114 &72795787 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4716129239565611745, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 94608201} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &94256458 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4716129239565611745, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 8025129159705944110} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &94608201 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 535991319} + m_Modifications: + - target: {fileID: 2830966423841907188, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Name + value: Health4 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 166.6388 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -92 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.x + value: 33.277588 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.y + value: 32.399506 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, type: 3} +--- !u!224 &94608202 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 94608201} + m_PrefabAsset: {fileID: 0} +--- !u!114 &165864964 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4716129239565611745, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 1379112359} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &211969290 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 211969291} + - component: {fileID: 211969293} + - component: {fileID: 211969292} + m_Layer: 5 + m_Name: ScoreText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &211969291 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211969290} + 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_Children: [] + m_Father: {fileID: 535991319} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 70.399994, y: -42.601685} + m_SizeDelta: {x: 80.73755, y: 25.20337} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &211969292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211969290} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.40145758, b: 0, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 0 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: 'Score: 0' +--- !u!222 &211969293 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211969290} + m_CullTransparentMesh: 0 --- !u!1 &219260671 GameObject: m_ObjectHideFlags: 0 @@ -132,6 +371,8 @@ GameObject: - component: {fileID: 219260672} - component: {fileID: 219260673} - component: {fileID: 219260674} + - component: {fileID: 219260675} + - component: {fileID: 219260676} m_Layer: 0 m_Name: GameManager m_TagString: Game manager @@ -190,6 +431,40 @@ MonoBehaviour: enemyPrefab: {fileID: 7250562544566202694, guid: ef6e23d6fe1e28e8c809679081854c6a, type: 3} target: {fileID: 2053847422} +--- !u!114 &219260675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 219260671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82c5ad49699c22f4fb38fb14d1d0115c, type: 3} + m_Name: + m_EditorClassIdentifier: + scoreText: {fileID: 211969292} +--- !u!114 &219260676 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 219260671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9615a9e1acab3f1818dda2d83d56608c, type: 3} + m_Name: + m_EditorClassIdentifier: + hearts: + - {fileID: 94256458} + - {fileID: 2062406612} + - {fileID: 971160996} + - {fileID: 72795787} + - {fileID: 165864964} + heartFull: {fileID: 21300000, guid: 4cd54486a573771ffa6ddb648338eabb, type: 3} + heartHalf: {fileID: 21300000, guid: 4f34e41f0677bc9b894c9611e42311ed, type: 3} + heartEmpty: {fileID: 21300000, guid: 06180f88b551009999a4d2dd3bb23b46, type: 3} --- !u!1 &407879043 GameObject: m_ObjectHideFlags: 0 @@ -529,6 +804,235 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: smoothing: 1 +--- !u!1 &535991315 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 535991319} + - component: {fileID: 535991318} + - component: {fileID: 535991317} + - component: {fileID: 535991316} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &535991316 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 535991315} + 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 &535991317 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 535991315} + 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 +--- !u!223 &535991318 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 535991315} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &535991319 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 535991315} + 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_Children: + - {fileID: 211969291} + - {fileID: 8025129159705944111} + - {fileID: 835689980} + - {fileID: 984084302} + - {fileID: 94608202} + - {fileID: 1379112360} + m_Father: {fileID: 0} + m_RootOrder: 12 + 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 &835689979 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 535991319} + m_Modifications: + - target: {fileID: 2830966423841907188, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Name + value: Health2 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 87.138794 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -92 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.x + value: 34.277588 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.y + value: 32.399506 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, type: 3} +--- !u!224 &835689980 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 835689979} + m_PrefabAsset: {fileID: 0} --- !u!1 &887921229 GameObject: m_ObjectHideFlags: 0 @@ -644,6 +1148,143 @@ PolygonCollider2D: - {x: 0.031678874, y: -0.2983211} - {x: 0.35, y: -0.35} - {x: 0.3502799, y: 0.34996805} +--- !u!114 &971160996 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4716129239565611745, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 984084301} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &984084301 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 535991319} + m_Modifications: + - target: {fileID: 2830966423841907188, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Name + value: Health3 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 127.16379 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -92 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.x + value: 34.327576 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.y + value: 32.399506 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, type: 3} +--- !u!224 &984084302 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 984084301} + m_PrefabAsset: {fileID: 0} --- !u!1 &996257474 GameObject: m_ObjectHideFlags: 0 @@ -932,6 +1573,72 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: smoothing: 1 +--- !u!1 &1162299382 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1162299385} + - component: {fileID: 1162299384} + - component: {fileID: 1162299383} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1162299383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1162299382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1162299384 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1162299382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1162299385 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1162299382} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1351818047 GameObject: m_ObjectHideFlags: 0 @@ -1144,6 +1851,131 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: smoothing: 1 +--- !u!1001 &1379112359 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 535991319} + m_Modifications: + - target: {fileID: 2830966423841907188, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Name + value: Health5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 206.1388 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -92 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.x + value: 32.277588 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.y + value: 32.399506 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, type: 3} +--- !u!224 &1379112360 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 1379112359} + m_PrefabAsset: {fileID: 0} --- !u!1 &1508769553 GameObject: m_ObjectHideFlags: 0 @@ -1555,6 +2387,8 @@ MonoBehaviour: movementSpeed: 2 sprintSpeed: 1.5 platformSpawner: {fileID: 219260673} + scoreSystem: {fileID: 219260675} + hudManager: {fileID: 219260676} --- !u!114 &2053847426 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1588,3 +2422,140 @@ Animator: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!114 &2062406612 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4716129239565611745, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 835689979} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &8025129159705944110 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 535991319} + m_Modifications: + - target: {fileID: 2830966423841907188, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Name + value: Health1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 46.793823 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -92 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.x + value: 33.587585 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_SizeDelta.y + value: 32.399506 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, type: 3} +--- !u!224 &8025129159705944111 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4752281081059304708, guid: 8992dd160b6b3c0adbad55ef9ea1d06f, + type: 3} + m_PrefabInstance: {fileID: 8025129159705944110} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Scripts/EnemyController.cs b/Assets/Scripts/EnemyController.cs index 61b5157..61efb83 100644 --- a/Assets/Scripts/EnemyController.cs +++ b/Assets/Scripts/EnemyController.cs @@ -13,12 +13,15 @@ public class EnemyController : CharacterControllerBase private short _hitsToRemove; private readonly Random _random = new Random(); private PlatformSpawner _platformSpawner; + private ScoreSystem _scoreSystem; // Start is called before the first frame update void Start() { _rb = GetComponent(); - _platformSpawner = GameObject.FindGameObjectWithTag("Game manager").GetComponent(); + var gm = GameObject.FindGameObjectWithTag("Game manager"); + _platformSpawner = gm.GetComponent(); + _scoreSystem = gm.GetComponent(); } private void OnEnable() @@ -61,6 +64,7 @@ public class EnemyController : CharacterControllerBase _rb.mass = 0.00001f; _rb.gravityScale = 0.01f; _rb.freezeRotation = false; + _scoreSystem.AddScore(1); } public bool IsAlive() => _rb.mass > 0.001f; diff --git a/Assets/Scripts/HUDManager.cs b/Assets/Scripts/HUDManager.cs new file mode 100644 index 0000000..2974c97 --- /dev/null +++ b/Assets/Scripts/HUDManager.cs @@ -0,0 +1,25 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class HUDManager : MonoBehaviour +{ + public Image[] hearts; + + public Sprite heartFull, heartHalf, heartEmpty; + + public void UpdateHealth(float health) + { + int hpph = 100 / hearts.Length; + for (int i = 0; i < hearts.Length; i++) + { + if (health >= hpph * i + 3 * hpph / 4) + hearts[i].sprite = heartFull; + else if (health < hpph * i + hpph / 4) + hearts[i].sprite = heartEmpty; + else + hearts[i].sprite = heartHalf; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/HUDManager.cs.meta b/Assets/Scripts/HUDManager.cs.meta new file mode 100644 index 0000000..797fc36 --- /dev/null +++ b/Assets/Scripts/HUDManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9615a9e1acab3f1818dda2d83d56608c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/OwnCharacterController.cs b/Assets/Scripts/OwnCharacterController.cs index 889565d..aaa4db2 100644 --- a/Assets/Scripts/OwnCharacterController.cs +++ b/Assets/Scripts/OwnCharacterController.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; +using UnityEngine.Serialization; using Random = System.Random; public class OwnCharacterController : CharacterControllerBase @@ -11,6 +12,8 @@ public class OwnCharacterController : CharacterControllerBase public float movementSpeed; public float sprintSpeed; public PlatformSpawner platformSpawner; + public ScoreSystem scoreSystem; + public HUDManager hudManager; private Vector3 _spawnPos; private float _health = 100f; @@ -73,7 +76,7 @@ public class OwnCharacterController : CharacterControllerBase if (_checkpointPos.x > 0 && (tr.position - _checkpointPos).magnitude < 2f) { - _spawnPos = _checkpointPos; + CheckpointReached(); _checkpointPosList.RemoveAt(0); _checkpointPos = _checkpointPosList.Count > 0 ? _checkpointPosList[0] : Vector3.zero; } @@ -82,17 +85,26 @@ public class OwnCharacterController : CharacterControllerBase _animator.SetBool(Sprint, Input.GetButton("Fire3")); } + private void CheckpointReached() + { + _spawnPos = _checkpointPos; + scoreSystem.AddScore(100); + } + public void Hit() { - _health -= (float) _random.NextDouble() % 20f + 20f; + _health -= (float) _random.NextDouble() * 20f; + hudManager.UpdateHealth(_health); if (_health <= 0f) Respawn(); } public void Respawn() { + scoreSystem.AddScore(-20); transform.position = _spawnPos; _health = 100f; + hudManager.UpdateHealth(_health); _rb.velocity = Vector2.zero; } diff --git a/Assets/Scripts/ScoreSystem.cs b/Assets/Scripts/ScoreSystem.cs new file mode 100644 index 0000000..be0af4d --- /dev/null +++ b/Assets/Scripts/ScoreSystem.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class ScoreSystem : MonoBehaviour +{ + public Text scoreText; + private int _score; + + public void AddScore(int score) + { + _score += score; + scoreText.text = "Score: " + _score; + } +} diff --git a/Assets/Scripts/ScoreSystem.cs.meta b/Assets/Scripts/ScoreSystem.cs.meta new file mode 100644 index 0000000..2df6f04 --- /dev/null +++ b/Assets/Scripts/ScoreSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82c5ad49699c22f4fb38fb14d1d0115c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/hud_heartEmpty.png b/Assets/Sprites/hud_heartEmpty.png new file mode 100644 index 0000000000000000000000000000000000000000..2dfc0c9c65d98805bd33798c7f80462d9356b14f GIT binary patch literal 1109 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 X(VI!%D