diff --git a/Assets/Resources/Sounds/KaizanBlu Chill Mix [No Copyright Music] Chill Lofi HipHop Beats FREE (Copyright Free) Lofi Hip Hop (128 kbps).mp3.meta b/Assets/Resources/Sounds/KaizanBlu Chill Mix [No Copyright Music] Chill Lofi HipHop Beats FREE (Copyright Free) Lofi Hip Hop (128 kbps).mp3.meta index 90583e3..56bd9c6 100644 --- a/Assets/Resources/Sounds/KaizanBlu Chill Mix [No Copyright Music] Chill Lofi HipHop Beats FREE (Copyright Free) Lofi Hip Hop (128 kbps).mp3.meta +++ b/Assets/Resources/Sounds/KaizanBlu Chill Mix [No Copyright Music] Chill Lofi HipHop Beats FREE (Copyright Free) Lofi Hip Hop (128 kbps).mp3.meta @@ -14,7 +14,7 @@ AudioImporter: forceToMono: 0 normalize: 1 preloadAudioData: 1 - loadInBackground: 0 + loadInBackground: 1 ambisonic: 0 3D: 1 userData: diff --git a/Assets/Resources/Sounds/Waesto - Miami (Vlog No Copyright Music) (128 kbps).mp3.meta b/Assets/Resources/Sounds/Waesto - Miami (Vlog No Copyright Music) (128 kbps).mp3.meta index 104de65..2544c10 100644 --- a/Assets/Resources/Sounds/Waesto - Miami (Vlog No Copyright Music) (128 kbps).mp3.meta +++ b/Assets/Resources/Sounds/Waesto - Miami (Vlog No Copyright Music) (128 kbps).mp3.meta @@ -14,7 +14,7 @@ AudioImporter: forceToMono: 0 normalize: 1 preloadAudioData: 1 - loadInBackground: 0 + loadInBackground: 1 ambisonic: 0 3D: 1 userData: diff --git a/Assets/Scenes/Menu.unity b/Assets/Scenes/Menu.unity index dbed1d6..5881923 100644 --- a/Assets/Scenes/Menu.unity +++ b/Assets/Scenes/Menu.unity @@ -1036,6 +1036,89 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 300437512} m_CullTransparentMesh: 1 +--- !u!1 &305009302 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 305009306} + - component: {fileID: 305009305} + - component: {fileID: 305009304} + m_Layer: 0 + m_Name: GrassGround + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &305009304 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 305009302} + 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: 2100000, guid: 197ee10712c66054cb2f88781c8d94f4, type: 2} + 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!33 &305009305 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 305009302} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &305009306 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 305009302} + m_LocalRotation: {x: -0, y: -0.008726558, z: -0, w: 0.999962} + m_LocalPosition: {x: -0.7351638, y: -0.7135278, z: 26.276003} + m_LocalScale: {x: 32.05, y: 1, z: 75.27} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 897475396} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &340785676 GameObject: m_ObjectHideFlags: 0 @@ -1786,7 +1869,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 601898925} - m_LocalRotation: {x: 0.050798725, y: -0.7004526, z: 0.05010695, w: 0.7101232} + m_LocalRotation: {x: 0.050798737, y: -0.7004526, z: 0.050106958, w: 0.7101232} m_LocalPosition: {x: 2.27, y: 4.16525, z: 3.82} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -3362,6 +3445,7 @@ Transform: m_Children: - {fileID: 43069913} - {fileID: 1755630382} + - {fileID: 305009306} m_Father: {fileID: 0} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 1, z: 0} @@ -4237,7 +4321,7 @@ MonoBehaviour: groundMoveSpeed: 10 portalModul: {fileID: 6679310150688957571, guid: 922c9d3ed72c7904e92daec040e7e8ff, type: 3} groundCounter: 0 - portalSpawnNumber: 15 + portalSpawnNumber: 5 --- !u!4 &1201779183 Transform: m_ObjectHideFlags: 0 @@ -4246,7 +4330,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1201779180} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -13.37, y: 0, z: 0} + m_LocalPosition: {x: -0.1, y: 0, z: -27.2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4327,6 +4411,7 @@ MonoBehaviour: boby: {fileID: 7398140401948337837} scoreText: {fileID: 702512603} timerText: {fileID: 1890329291} + homeCamera: {fileID: 1615993236} audioMixer: {fileID: 24100000, guid: 911068ff86e0a0b4d8dae92436b938fa, type: 2} --- !u!114 &1201779189 MonoBehaviour: @@ -4909,7 +4994,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1513686735} - m_LocalRotation: {x: 0.22590086, y: 0.0030496013, z: -0.0007071918, w: 0.9741453} + m_LocalRotation: {x: 0.22590086, y: 0.0030496388, z: -0.00070720055, w: 0.9741453} m_LocalPosition: {x: -0.28647116, y: 6.2664723, z: 2.074831} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -5491,8 +5576,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1603739812} - - component: {fileID: 1603739814} - - component: {fileID: 1603739813} m_Layer: 0 m_Name: Cameras m_TagString: Untagged @@ -5519,110 +5602,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!82 &1603739813 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1603739811} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 0} - m_PlayOnAwake: 1 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 ---- !u!81 &1603739814 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1603739811} - m_Enabled: 1 --- !u!1 &1615993234 GameObject: m_ObjectHideFlags: 0 @@ -5647,7 +5626,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1615993234} - m_LocalRotation: {x: -0.00033706616, y: 0.9991459, z: -0.04047412, w: -0.008320832} + m_LocalRotation: {x: -0.0003370659, y: 0.9991459, z: -0.040474083, w: -0.008320832} m_LocalPosition: {x: -0.26, y: 4, z: 13.5} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -6535,7 +6514,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1895677325} - m_LocalRotation: {x: -0.00033706616, y: 0.9991459, z: -0.04047412, w: -0.008320832} + m_LocalRotation: {x: -0.0003370659, y: 0.9991459, z: -0.040474083, w: -0.008320832} m_LocalPosition: {x: 0.016471177, y: 2.8035278, z: -12.784832} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -15729,6 +15708,8 @@ GameObject: - component: {fileID: 7917514869596290073} - component: {fileID: 7917514869596290074} - component: {fileID: 7917514869596290075} + - component: {fileID: 7917514869596290077} + - component: {fileID: 7917514869596290076} m_Layer: 0 m_Name: Boby m_TagString: Player @@ -16453,6 +16434,110 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: isGrounded: 1 +--- !u!82 &7917514869596290076 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7398140401948337837} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: -8278190956376925970, guid: 911068ff86e0a0b4d8dae92436b938fa, type: 2} + m_audioClip: {fileID: 8300000, guid: 25608c1bc780145479ecff7d04b50126, type: 3} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!81 &7917514869596290077 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7398140401948337837} + m_Enabled: 1 --- !u!4 &7986884067029569574 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/GroundController.cs b/Assets/Scripts/GroundController.cs index e1344c9..0bad4f4 100644 --- a/Assets/Scripts/GroundController.cs +++ b/Assets/Scripts/GroundController.cs @@ -19,6 +19,8 @@ public class GroundController : MonoBehaviour //private CollectibleSpawner cs; + private Material newMaterial; + private void Awake() { //cs = FindObjectOfType(); @@ -39,6 +41,8 @@ public class GroundController : MonoBehaviour { Debug.Log("ground length: " + ground.Length); } + + newMaterial = materials[0]; } private void Move(GameObject move) @@ -74,27 +78,19 @@ public class GroundController : MonoBehaviour //uj ground letrehozas if (ground[ground.Length - 1].transform.position.z <= 120) { - if(groundCounter == portalSpawnNumber){ + if (groundCounter == portalSpawnNumber) + { CreateNewGround(true); groundCounter = 0; //ne menjen a vegtelensegig a counter - }else{ + } + else + { CreateNewGround(); } ground = GameObject.FindGameObjectsWithTag("Ground"); - for (int i = 0; i < ground.Length; i++) - { - Transform[] lanes = new Transform[3]; - lanes[0] = ground[i].transform.Find("Lane1"); - lanes[1] = ground[i].transform.Find("Lane2"); - lanes[2] = ground[i].transform.Find("Lane3"); - - foreach (var item in lanes) - { - item.GetComponent().material = materials[materialIndex]; - } - } + ModuleColorChange(); } //cs.SpawnCoin(); @@ -152,7 +148,7 @@ public class GroundController : MonoBehaviour if (isLeftSide && pos.x > 0) //x negativ hogy a bal oldalra keruljon pos.x = -pos.x; - + Instantiate(inst, pos, rotation); @@ -160,6 +156,22 @@ public class GroundController : MonoBehaviour OrderArrayByZ(sideObjectsSpawned); } + public void ModuleColorChange() + { + for (int i = 0; i < ground.Length; i++) + { + Transform[] lanes = new Transform[3]; + lanes[0] = ground[i].transform.Find("Lane1"); + lanes[1] = ground[i].transform.Find("Lane2"); + lanes[2] = ground[i].transform.Find("Lane3"); + + foreach (var item in lanes) + { + item.GetComponent().material = newMaterial; + } + } + } + public void changeMaterialIndex() { int materialteszt; @@ -184,6 +196,11 @@ public class GroundController : MonoBehaviour teszteljtovabb = true; } + public void ChangeMaterial(Material mat) + { + newMaterial = mat; + } + private bool CheckGroundToDestroy(GameObject toCheck) { //z = -80 -nal lehet torolni @@ -219,12 +236,12 @@ public class GroundController : MonoBehaviour GameObject inst; - if(!portalModulSpawn) + if (!portalModulSpawn) inst = loadFrom[random]; else inst = portalModul; - - + + //egy modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modul hossza Instantiate(inst, new Vector3(ground[ground.Length - 1].transform.position.x, ground[ground.Length - 1].transform.position.y, ground[ground.Length - 1].transform.position.z + 40), ground[ground.Length - 1].transform.rotation); groundCounter++; diff --git a/Assets/Scripts/portal.cs b/Assets/Scripts/portal.cs index ca533d2..44258ac 100644 --- a/Assets/Scripts/portal.cs +++ b/Assets/Scripts/portal.cs @@ -5,20 +5,22 @@ using UnityEngine; public class portal : MonoBehaviour { private GroundController gc; - // Start is called before the first frame update + private int random; + void Awake() { gc = FindObjectOfType(); - + random = UnityEngine.Random.Range(0, gc.materials.Length); - gameObject.GetComponent().material = gc.materials[gc.materialIndex]; + gameObject.GetComponent().material = gc.materials[random]; } private void OnTriggerEnter(Collider other) { if(other.gameObject.tag.Equals("Player")){ - gc.changeMaterialIndex(); + gc.ChangeMaterial(gc.materials[random]); + gc.ModuleColorChange(); } }