diff --git a/Assets/Black.mat b/Assets/Black.mat index b857a1ac..cbb2e281 100644 --- a/Assets/Black.mat +++ b/Assets/Black.mat @@ -79,5 +79,5 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/BuildingParent.cs b/Assets/BuildingParent.cs index a26e006c..4d1c269b 100644 --- a/Assets/BuildingParent.cs +++ b/Assets/BuildingParent.cs @@ -40,6 +40,8 @@ public class BuildingParent : MonoBehaviour [ContextMenu("Func")] public void Func() { + //if (InstantiatedObstacle != null) + // Destroy(InstantiatedObstacle); for (int i = 0; i < 10; i++) { Building temp = Instantiate(buildingObj, transform); @@ -55,7 +57,7 @@ public class BuildingParent : MonoBehaviour temp.renderers[j].material = Buildingmaterials[rand]; } } - if (percentAgeObstacle < 30) + if (percentAgeObstacle < 80) { InstantiatedObstacle = Instantiate(obstacleObj, temp.transform); } @@ -68,9 +70,10 @@ public class BuildingParent : MonoBehaviour int temp = counter % BuildingPool.Count; BuildingPool[temp].transform.localPosition = new Vector3(0, 0, -100 - (10 * counter)); counter++; - Destroy(InstantiatedObstacle); + if (InstantiatedObstacle != null) + Destroy(InstantiatedObstacle.gameObject); int percentAgeObstacle = Random.Range(0, 100); - if (percentAgeObstacle < 20) + if (percentAgeObstacle < 80) InstantiatedObstacle = Instantiate(obstacleObj, BuildingPool[temp].transform); int percentAge = Random.Range(0, 100); diff --git a/Assets/GameManager.cs b/Assets/GameManager.cs new file mode 100644 index 00000000..27fdc970 --- /dev/null +++ b/Assets/GameManager.cs @@ -0,0 +1,39 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +public enum DifficultyLevel +{ + easy, medium, hard, +} +public class GameManager : MonoBehaviour +{ + public DifficultyLevel difficultyLevel; + public List difficultyScores; + public float Score; + public static GameManager instance; + public bool isGameOver = false; + + public void Awake() + { + instance = this; + } + private void Start() + { + StartCoroutine(ScoreUpdateRoutine()); + } + IEnumerator ScoreUpdateRoutine() + { + difficultyLevel = DifficultyLevel.easy; + while (!isGameOver) + { + Score++; + UIManager.instance.ScoreText.text = Score.ToString(); + if(Score > difficultyScores[(int)difficultyLevel] && (int)difficultyLevel< difficultyScores.Count-1) + { + difficultyLevel++; + } + Debug.Log("difficulty Level: " + (int)difficultyLevel); + yield return new WaitForSeconds(1); + } + } +} diff --git a/Assets/GameManager.cs.meta b/Assets/GameManager.cs.meta new file mode 100644 index 00000000..816b205d --- /dev/null +++ b/Assets/GameManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e82af5507a3f3745885b4e14a26d858 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Green.mat b/Assets/Green.mat index 8480c790..4a31459c 100644 --- a/Assets/Green.mat +++ b/Assets/Green.mat @@ -78,6 +78,6 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.11969948, g: 1, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Obstacle.cs b/Assets/Obstacle.cs index c836f898..c207c77c 100644 --- a/Assets/Obstacle.cs +++ b/Assets/Obstacle.cs @@ -4,14 +4,36 @@ using UnityEngine; public class Obstacle : MonoBehaviour { - public List obstacleObjs; + public List easyObstacleObjs; + public List mediumObstacleObjs; + public List hardObstacleObjs; + private void Start() { Starter(); } public void Starter() { - int rand=Random.Range(0, obstacleObjs.Count); - obstacleObjs[rand].gameObject.SetActive(true); + List list = DifficultyList(); + Debug.Log("list: " + list[list.Count-1].name); + int rand = Random.Range(0, list.Count); + list[rand].gameObject.SetActive(true); + } + List DifficultyList() + { + int difficultyLevel = (int)GameManager.instance.difficultyLevel; + return difficultyLevel == 0 ? easyObstacleObjs : difficultyLevel == 1 ? mediumObstacleObjs : hardObstacleObjs; + //if (difficultyLevel == 0) + //{ + // return easyObstacleObjs; + //} + //else if (difficultyLevel == 1) + //{ + // return mediumObstacleObjs; + //} + //else + //{ + // return HardObstacleObjs; + //} } } diff --git a/Assets/Prefabs/Obstacle.prefab b/Assets/Prefabs/Obstacle.prefab index 4e3295cc..92f2b405 100644 --- a/Assets/Prefabs/Obstacle.prefab +++ b/Assets/Prefabs/Obstacle.prefab @@ -1,5 +1,70 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &1044658251608497272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8768496773786210676} + m_Layer: 7 + m_Name: H2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &8768496773786210676 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044658251608497272} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} + m_LocalPosition: {x: 0, y: 0, z: -4.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3106818303754150639} + - {fileID: 7770193419214493253} + m_Father: {fileID: 7390422420975325489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45} +--- !u!1 &1417453949132207179 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837082169179494012} + m_Layer: 7 + m_Name: H4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1837082169179494012 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1417453949132207179} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.75, y: 0, z: -4.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7517985913138904347} + m_Father: {fileID: 7390422420975325489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1480047792977806050 GameObject: m_ObjectHideFlags: 0 @@ -10,7 +75,7 @@ GameObject: m_Component: - component: {fileID: 885365430077173379} m_Layer: 7 - m_Name: v2 + m_Name: H3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -25,7 +90,7 @@ Transform: m_GameObject: {fileID: 1480047792977806050} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -4.6} + m_LocalPosition: {x: -0.75, y: 0, z: -4.6} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -61,7 +126,7 @@ Transform: m_GameObject: {fileID: 1577995798430993878} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} - m_LocalPosition: {x: 1.688, y: -0.76, z: 4.41} + m_LocalPosition: {x: 1.688, y: -0.76, z: 0} m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} m_ConstrainProportionsScale: 1 m_Children: [] @@ -150,6 +215,38 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1619415552616948589 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8999447087733966757} + m_Layer: 7 + m_Name: M4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &8999447087733966757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619415552616948589} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: -4.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5633329244040679126} + m_Father: {fileID: 7390422420975325489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} --- !u!1 &1787290293472421831 GameObject: m_ObjectHideFlags: 0 @@ -160,7 +257,7 @@ GameObject: m_Component: - component: {fileID: 1295171175966300570} m_Layer: 7 - m_Name: v2 (5) + m_Name: M1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -211,7 +308,7 @@ Transform: m_GameObject: {fileID: 2176866969402284360} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} - m_LocalPosition: {x: 0.001, y: -1.765, z: 4.41} + m_LocalPosition: {x: 0.001, y: -1.765, z: 0} m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} m_ConstrainProportionsScale: 1 m_Children: [] @@ -420,7 +517,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &3145214791736818536 +--- !u!1 &2897223127207802356 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -428,11 +525,11 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 6746639869638297064} - - component: {fileID: 4799435858410384380} - - component: {fileID: 5521792786852621617} - - component: {fileID: 3855201530291334490} - - component: {fileID: 8295631785149944746} + - component: {fileID: 7517985913138904347} + - component: {fileID: 2573083459366504337} + - component: {fileID: 5110610091785602350} + - component: {fileID: 3079274642040473841} + - component: {fileID: 5059968224802239126} m_Layer: 7 m_Name: Cube m_TagString: Untagged @@ -440,36 +537,36 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &6746639869638297064 +--- !u!4 &7517985913138904347 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3145214791736818536} + m_GameObject: {fileID: 2897223127207802356} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} - m_LocalPosition: {x: -1.688, y: 0.6946405, z: 4.41} - m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.5, y: 3.5194497, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 4823222064297436343} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45} ---- !u!33 &4799435858410384380 + m_Father: {fileID: 1837082169179494012} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &2573083459366504337 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3145214791736818536} + m_GameObject: {fileID: 2897223127207802356} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &5521792786852621617 +--- !u!23 &5110610091785602350 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3145214791736818536} + m_GameObject: {fileID: 2897223127207802356} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -505,13 +602,13 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &3855201530291334490 +--- !u!65 &3079274642040473841 BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3145214791736818536} + m_GameObject: {fileID: 2897223127207802356} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -526,19 +623,19 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &8295631785149944746 +--- !u!114 &5059968224802239126 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3145214791736818536} + m_GameObject: {fileID: 2897223127207802356} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &3538677608111202394 +--- !u!1 &3127142085522439074 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -546,11 +643,11 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7606323106947231764} - - component: {fileID: 4241992485719357569} - - component: {fileID: 4757788996510623846} - - component: {fileID: 2592458662843584037} - - component: {fileID: 7105180655307349342} + - component: {fileID: 5633329244040679126} + - component: {fileID: 5189304361861008987} + - component: {fileID: 1354455469259209059} + - component: {fileID: 6723242664687383281} + - component: {fileID: 4793912904997098481} m_Layer: 7 m_Name: Cube m_TagString: Untagged @@ -558,36 +655,36 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &7606323106947231764 +--- !u!4 &5633329244040679126 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3538677608111202394} + m_GameObject: {fileID: 3127142085522439074} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -1.513, y: -0.0418, z: 4.41} - m_LocalScale: {x: 1.5, y: 3.5194497, z: 1} + m_LocalPosition: {x: -0.97, y: -0.000000029802, z: 0} + m_LocalScale: {x: 1, y: 3.423, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 885365430077173379} + m_Father: {fileID: 8999447087733966757} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &4241992485719357569 +--- !u!33 &5189304361861008987 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3538677608111202394} + m_GameObject: {fileID: 3127142085522439074} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &4757788996510623846 +--- !u!23 &1354455469259209059 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3538677608111202394} + m_GameObject: {fileID: 3127142085522439074} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -623,13 +720,13 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &2592458662843584037 +--- !u!65 &6723242664687383281 BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3538677608111202394} + m_GameObject: {fileID: 3127142085522439074} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -644,19 +741,19 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &7105180655307349342 +--- !u!114 &4793912904997098481 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3538677608111202394} + m_GameObject: {fileID: 3127142085522439074} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &4070348558281142435 +--- !u!1 &3145214791736818536 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -664,11 +761,11 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 5922614228553472759} - - component: {fileID: 3205405760505763146} - - component: {fileID: 4275165362657368192} - - component: {fileID: 7974730601669538336} - - component: {fileID: 2753438306603955334} + - component: {fileID: 6746639869638297064} + - component: {fileID: 4799435858410384380} + - component: {fileID: 5521792786852621617} + - component: {fileID: 3855201530291334490} + - component: {fileID: 8295631785149944746} m_Layer: 7 m_Name: Cube m_TagString: Untagged @@ -676,36 +773,36 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &5922614228553472759 +--- !u!4 &6746639869638297064 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4070348558281142435} + m_GameObject: {fileID: 3145214791736818536} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: -0.000000029802, z: 4.41} - m_LocalScale: {x: 1, y: 3.423, z: 1} - m_ConstrainProportionsScale: 0 + m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} + m_LocalPosition: {x: -1.688, y: 0.6946405, z: 0} + m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} + m_ConstrainProportionsScale: 1 m_Children: [] - m_Father: {fileID: 6000809361457693090} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &3205405760505763146 + m_Father: {fileID: 4823222064297436343} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45} +--- !u!33 &4799435858410384380 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4070348558281142435} + m_GameObject: {fileID: 3145214791736818536} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &4275165362657368192 +--- !u!23 &5521792786852621617 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4070348558281142435} + m_GameObject: {fileID: 3145214791736818536} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -741,13 +838,13 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &7974730601669538336 +--- !u!65 &3855201530291334490 BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4070348558281142435} + m_GameObject: {fileID: 3145214791736818536} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -762,19 +859,19 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &2753438306603955334 +--- !u!114 &8295631785149944746 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4070348558281142435} + m_GameObject: {fileID: 3145214791736818536} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &5023188510960135218 +--- !u!1 &3538677608111202394 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -782,48 +879,48 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 5399354308248728988} - - component: {fileID: 965605946053083999} - - component: {fileID: 6289450457232285118} - - component: {fileID: 1642609181628294372} - - component: {fileID: 5867167429585405865} + - component: {fileID: 7606323106947231764} + - component: {fileID: 4241992485719357569} + - component: {fileID: 4757788996510623846} + - component: {fileID: 2592458662843584037} + - component: {fileID: 7105180655307349342} m_Layer: 7 - m_Name: Capsule (1) + m_Name: Cube m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &5399354308248728988 +--- !u!4 &7606323106947231764 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5023188510960135218} + m_GameObject: {fileID: 3538677608111202394} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.20000002, y: 1.6079001, z: 0.2} + m_LocalScale: {x: 1.5, y: 3.5194497, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 5478251392013022964} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!33 &965605946053083999 + m_Father: {fileID: 885365430077173379} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4241992485719357569 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5023188510960135218} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &6289450457232285118 + m_GameObject: {fileID: 3538677608111202394} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4757788996510623846 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5023188510960135218} + m_GameObject: {fileID: 3538677608111202394} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -859,13 +956,13 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1642609181628294372 -CapsuleCollider: +--- !u!65 &2592458662843584037 +BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5023188510960135218} + m_GameObject: {fileID: 3538677608111202394} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -877,24 +974,22 @@ CapsuleCollider: m_IsTrigger: 0 m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &5867167429585405865 +--- !u!114 &7105180655307349342 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5023188510960135218} + m_GameObject: {fileID: 3538677608111202394} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &5123622407992111394 +--- !u!1 &4070348558281142435 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -902,50 +997,558 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7459072683493301783} + - component: {fileID: 5922614228553472759} + - component: {fileID: 3205405760505763146} + - component: {fileID: 4275165362657368192} + - component: {fileID: 7974730601669538336} + - component: {fileID: 2753438306603955334} m_Layer: 7 - m_Name: v2 (3) + m_Name: Cube m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7459072683493301783 + m_IsActive: 1 +--- !u!4 &5922614228553472759 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5123622407992111394} + m_GameObject: {fileID: 4070348558281142435} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -4.6} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 1, y: -0.000000029802, z: 0} + m_LocalScale: {x: 1, y: 3.423, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4921045682447331009} - m_Father: {fileID: 7390422420975325489} + m_Children: [] + m_Father: {fileID: 6000809361457693090} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &6666992082181106981 -GameObject: +--- !u!33 &3205405760505763146 +MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7390422420975325489} - - component: {fileID: 6154448319612270510} - m_Layer: 7 - m_Name: Obstacle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7390422420975325489 -Transform: - m_ObjectHideFlags: 0 + m_GameObject: {fileID: 4070348558281142435} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4275165362657368192 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070348558281142435} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &7974730601669538336 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070348558281142435} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &2753438306603955334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070348558281142435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4795605428293941205 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5476834309493904} + - component: {fileID: 8244884630231968996} + - component: {fileID: 6065251823982703143} + - component: {fileID: 3941779227111502764} + - component: {fileID: 2501032982018616324} + m_Layer: 7 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5476834309493904 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4795605428293941205} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.97, y: -0.000000029802, z: 0} + m_LocalScale: {x: 1, y: 3.423, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3617756976228864863} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8244884630231968996 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4795605428293941205} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6065251823982703143 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4795605428293941205} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &3941779227111502764 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4795605428293941205} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &2501032982018616324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4795605428293941205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4890195419769769740 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3106818303754150639} + - component: {fileID: 5201987200049101609} + - component: {fileID: 6288107186657947126} + - component: {fileID: 7169129429527586062} + - component: {fileID: 5332675224703864631} + m_Layer: 7 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3106818303754150639 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890195419769769740} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2, y: 1.6079001, z: 0.20000002} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8768496773786210676} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5201987200049101609 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890195419769769740} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6288107186657947126 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890195419769769740} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!136 &7169129429527586062 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890195419769769740} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &5332675224703864631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890195419769769740} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &5023188510960135218 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5399354308248728988} + - component: {fileID: 965605946053083999} + - component: {fileID: 6289450457232285118} + - component: {fileID: 1642609181628294372} + - component: {fileID: 5867167429585405865} + m_Layer: 7 + m_Name: Capsule (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5399354308248728988 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5023188510960135218} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.20000002, y: 1.6079001, z: 0.2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5478251392013022964} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &965605946053083999 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5023188510960135218} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6289450457232285118 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5023188510960135218} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!136 &1642609181628294372 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5023188510960135218} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &5867167429585405865 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5023188510960135218} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &5123622407992111394 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7459072683493301783} + m_Layer: 7 + m_Name: E3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &7459072683493301783 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5123622407992111394} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -4.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4921045682447331009} + m_Father: {fileID: 7390422420975325489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5938389365305432150 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3617756976228864863} + m_Layer: 7 + m_Name: M3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &3617756976228864863 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5938389365305432150} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: -4.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5476834309493904} + m_Father: {fileID: 7390422420975325489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!1 &6666992082181106981 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7390422420975325489} + - component: {fileID: 6154448319612270510} + m_Layer: 7 + m_Name: Obstacle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7390422420975325489 +Transform: + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -956,14 +1559,18 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 5478251392013022964} - - {fileID: 885365430077173379} - {fileID: 4823222064297436343} - {fileID: 4090076952669802862} - {fileID: 7459072683493301783} - {fileID: 5711529514672014276} - {fileID: 1295171175966300570} - {fileID: 6000809361457693090} + - {fileID: 3617756976228864863} + - {fileID: 8999447087733966757} + - {fileID: 5478251392013022964} + - {fileID: 8768496773786210676} + - {fileID: 885365430077173379} + - {fileID: 1837082169179494012} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &6154448319612270510 @@ -978,15 +1585,33 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 49375fc76e80e854381c14a230bd651d, type: 3} m_Name: m_EditorClassIdentifier: - obstacleObjs: - - {fileID: 8105216258272517273} - - {fileID: 1480047792977806050} + easyObstacleObjs: + - {fileID: 7435278529207429878} + - {fileID: 8080524096957227338} + - {fileID: 5123622407992111394} + - {fileID: 6668852302156767805} + mediumObstacleObjs: + - {fileID: 7435278529207429878} + - {fileID: 8080524096957227338} + - {fileID: 5123622407992111394} + - {fileID: 6668852302156767805} + - {fileID: 1787290293472421831} + - {fileID: 6831542664685978947} + - {fileID: 5938389365305432150} + - {fileID: 1619415552616948589} + hardObstacleObjs: - {fileID: 7435278529207429878} - {fileID: 8080524096957227338} - {fileID: 5123622407992111394} - {fileID: 6668852302156767805} - {fileID: 1787290293472421831} - {fileID: 6831542664685978947} + - {fileID: 5938389365305432150} + - {fileID: 1619415552616948589} + - {fileID: 8105216258272517273} + - {fileID: 1044658251608497272} + - {fileID: 1480047792977806050} + - {fileID: 1417453949132207179} --- !u!1 &6668852302156767805 GameObject: m_ObjectHideFlags: 0 @@ -997,7 +1622,7 @@ GameObject: m_Component: - component: {fileID: 5711529514672014276} m_Layer: 7 - m_Name: v2 (4) + m_Name: E4 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1029,7 +1654,7 @@ GameObject: m_Component: - component: {fileID: 6000809361457693090} m_Layer: 7 - m_Name: v2 (6) + m_Name: M2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1080,7 +1705,7 @@ Transform: m_GameObject: {fileID: 7232985979888883490} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} - m_LocalPosition: {x: 0.001, y: 1.765, z: 4.41} + m_LocalPosition: {x: 0.001, y: 1.765, z: 0} m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} m_ConstrainProportionsScale: 1 m_Children: [] @@ -1179,7 +1804,7 @@ GameObject: m_Component: - component: {fileID: 4823222064297436343} m_Layer: 7 - m_Name: v2 (1) + m_Name: E1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1211,7 +1836,7 @@ GameObject: m_Component: - component: {fileID: 4090076952669802862} m_Layer: 7 - m_Name: v2 (2) + m_Name: E2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1243,7 +1868,7 @@ GameObject: m_Component: - component: {fileID: 5478251392013022964} m_Layer: 7 - m_Name: v1 + m_Name: H1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1266,6 +1891,126 @@ Transform: - {fileID: 5399354308248728988} m_Father: {fileID: 7390422420975325489} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8834233882995550369 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7770193419214493253} + - component: {fileID: 3095032801732085872} + - component: {fileID: 1933458348913218238} + - component: {fileID: 7972531004561880281} + - component: {fileID: 7342527444143059566} + m_Layer: 7 + m_Name: Capsule (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7770193419214493253 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8834233882995550369} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.20000002, y: 1.6079001, z: 0.2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8768496773786210676} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &3095032801732085872 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8834233882995550369} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1933458348913218238 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8834233882995550369} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!136 &7972531004561880281 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8834233882995550369} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &7342527444143059566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8834233882995550369} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e4c2115f7c8919458497c9aea88d927, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &9199462185720323440 GameObject: m_ObjectHideFlags: 0 @@ -1295,7 +2040,7 @@ Transform: m_GameObject: {fileID: 9199462185720323440} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.97, y: -0.000000029802, z: 4.41} + m_LocalPosition: {x: -0.97, y: -0.000000029802, z: 0} m_LocalScale: {x: 1, y: 3.423, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index ab06cfb2..667b7f63 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -1271,6 +1271,54 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &807834275 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 807834277} + - component: {fileID: 807834276} + m_Layer: 0 + m_Name: GameManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &807834276 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 807834275} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e82af5507a3f3745885b4e14a26d858, type: 3} + m_Name: + m_EditorClassIdentifier: + difficultyLevel: 0 + difficultyScores: 050000000a0000000f000000 + Score: 0 + isGameOver: 0 +--- !u!4 &807834277 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 807834275} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.46505004, y: 23.937662, z: 0.49310187} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &811116566 GameObject: m_ObjectHideFlags: 0 @@ -5159,3 +5207,4 @@ SceneRoots: - {fileID: 811116571} - {fileID: 391446497} - {fileID: 1442169893} + - {fileID: 807834277} diff --git a/Assets/UIManager.cs b/Assets/UIManager.cs index e7c5bdb2..d60182e0 100644 --- a/Assets/UIManager.cs +++ b/Assets/UIManager.cs @@ -10,8 +10,6 @@ public class UIManager : MonoBehaviour public CharacterController player; public GameObject GameOverPanel; public CameraFollow cameraFollow; - bool isGameOver = false; - float Score; public TextMeshProUGUI ScoreText; private void Awake() { @@ -20,21 +18,11 @@ public class UIManager : MonoBehaviour private void Start() { UpdateHealth(); - StartCoroutine(ScoreUpdateRoutine()); - } - IEnumerator ScoreUpdateRoutine() - { - while(!isGameOver) - { - Score += Time.fixedDeltaTime; - ScoreText.text = Mathf.FloorToInt(Score).ToString(); - yield return new WaitForSeconds(Time.fixedDeltaTime); - - } } + public void UpdateHealth() { - if (!isGameOver) + if (!GameManager.instance.isGameOver) { if (player.Health <= 0) { @@ -50,7 +38,7 @@ public class UIManager : MonoBehaviour } void GameOver() { - isGameOver = true; + GameManager.instance.isGameOver = true; Destroy(player.SpineHingeJoint); GameOverPanel.SetActive(true); cameraFollow.isPlaying = false;