diff --git a/Assets/Materials/Arrow.mat b/Assets/Materials/Arrow.mat new file mode 100644 index 0000000..543379b --- /dev/null +++ b/Assets/Materials/Arrow.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Arrow + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 81f6ad10b32bd63439bc881e62057053, type: 3} + m_Scale: {x: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Materials/Arrow.mat.meta b/Assets/Materials/Arrow.mat.meta new file mode 100644 index 0000000..52080d7 --- /dev/null +++ b/Assets/Materials/Arrow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d4054f64833e024c9083f2962d66c3e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/GO.mat b/Assets/Materials/GO.mat new file mode 100644 index 0000000..672ed50 --- /dev/null +++ b/Assets/Materials/GO.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: GO + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: acf569edd605b0a42941adb20ce74d88, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Materials/GO.mat.meta b/Assets/Materials/GO.mat.meta new file mode 100644 index 0000000..98082ef --- /dev/null +++ b/Assets/Materials/GO.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fae7071559ed80d43bc5f5b0bebab23d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/RUN.mat b/Assets/Materials/RUN.mat new file mode 100644 index 0000000..ad41419 --- /dev/null +++ b/Assets/Materials/RUN.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: RUN + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 7c8a67ef95d379a4497a341d4fc36517, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Materials/RUN.mat.meta b/Assets/Materials/RUN.mat.meta new file mode 100644 index 0000000..97f43bb --- /dev/null +++ b/Assets/Materials/RUN.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 215a0c487f5af7a40bbc1b61180fa32b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Infinity Runner.unity b/Assets/Scenes/Infinity Runner.unity index b7e51be..e1ea40e 100644 --- a/Assets/Scenes/Infinity Runner.unity +++ b/Assets/Scenes/Infinity Runner.unity @@ -2740,6 +2740,10 @@ MonoBehaviour: - {fileID: 665153724702688003, guid: 3ad84dc4c084fc0458bf98f2f25c9c4b, type: 3} boundaries: {fileID: 9181995847428758509, guid: cd8f80a3dcff4954598e8b72fd740734, type: 3} + startMaterials: + - {fileID: 2100000, guid: 4d4054f64833e024c9083f2962d66c3e, type: 2} + - {fileID: 2100000, guid: fae7071559ed80d43bc5f5b0bebab23d, type: 2} + - {fileID: 2100000, guid: 215a0c487f5af7a40bbc1b61180fa32b, type: 2} --- !u!1 &1834093088 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/InfinityRunner.cs b/Assets/Scripts/InfinityRunner.cs index dfe8201..56dec65 100644 --- a/Assets/Scripts/InfinityRunner.cs +++ b/Assets/Scripts/InfinityRunner.cs @@ -19,6 +19,7 @@ public class InfinityRunner : MonoBehaviour public GameObject[] easyObstacleList; public GameObject[] medObstaclelIst; public GameObject boundaries; + public Material[] startMaterials; private int selection; private int size; @@ -26,6 +27,8 @@ public class InfinityRunner : MonoBehaviour private float spawnTime = 0.0f; private Transform lastSpawn; + + MeshRenderer mr; void Awake() { @@ -184,27 +187,57 @@ public class InfinityRunner : MonoBehaviour GameObject start = Instantiate(obstacleList[0], new Vector3(0, 0, 0), Quaternion.identity) as GameObject; start.transform.localScale = new Vector3(25, 1, 25); + mr = start.GetComponent(); + mr.material = startMaterials[0]; + walls = Instantiate(boundaries, new Vector3(12.5f, 0, 0), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[1]; + walls = Instantiate(boundaries, new Vector3(-12.5f, 0, 0), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[1]; + GameObject startOne = Instantiate(obstacleList[0], new Vector3(0, 0, 25), Quaternion.identity) as GameObject; startOne.transform.localScale = new Vector3(25, 1, 25); + mr = startOne.GetComponent(); + mr.material = startMaterials[0]; + walls = Instantiate(boundaries, new Vector3(12.5f, 0, 25), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[2]; + walls = Instantiate(boundaries, new Vector3(-12.5f, 0, 25), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[2]; + GameObject startTwo = Instantiate(obstacleList[0], new Vector3(0, 0, 50), Quaternion.identity) as GameObject; startTwo.transform.localScale = new Vector3(25, 1, 25); + mr = startTwo.GetComponent(); + mr.material = startMaterials[0]; + walls = Instantiate(boundaries, new Vector3(12.5f, 0, 50), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[1]; + walls = Instantiate(boundaries, new Vector3(-12.5f, 0, 50), Quaternion.identity) as GameObject; walls.transform.localScale = new Vector3(0.25f, 1, 0.25f); + mr = walls.transform.GetChild(0).gameObject.GetComponent(); + mr.material = startMaterials[1]; + lastSpawn = startTwo.transform; script.finished = false;