From 282faea747d62b61e8017f06e288059f6f6059fb Mon Sep 17 00:00:00 2001 From: Playmaker1210 Date: Mon, 29 May 2023 14:36:51 +0200 Subject: [PATCH] update --- Assets/Resources/Prefabs/portal.prefab | 6 +- Assets/Scenes/Menu.unity | 218 ++++++++++++------------- Assets/Scripts/jatekmanager.cs | 12 +- Assets/Scripts/portal.cs | 4 + 4 files changed, 123 insertions(+), 117 deletions(-) diff --git a/Assets/Resources/Prefabs/portal.prefab b/Assets/Resources/Prefabs/portal.prefab index 34ffbdd..6d5bd61 100644 --- a/Assets/Resources/Prefabs/portal.prefab +++ b/Assets/Resources/Prefabs/portal.prefab @@ -62,7 +62,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: edb4146c95fe5b5419e3b63b2195a35a, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -353,7 +353,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: edb4146c95fe5b5419e3b63b2195a35a, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -450,7 +450,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: edb4146c95fe5b5419e3b63b2195a35a, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scenes/Menu.unity b/Assets/Scenes/Menu.unity index d11a3bf..dbed1d6 100644 --- a/Assets/Scenes/Menu.unity +++ b/Assets/Scenes/Menu.unity @@ -1786,7 +1786,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 601898925} - m_LocalRotation: {x: 0.05079872, y: -0.7004526, z: 0.05010694, w: 0.7101232} + m_LocalRotation: {x: 0.050798725, y: -0.7004526, z: 0.05010695, 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 @@ -4314,7 +4314,7 @@ MonoBehaviour: m_EditorClassIdentifier: State: 0 playGomb: {fileID: 645543792} - garazs: {fileID: 1876191122} + garazs: {fileID: 897475395} homeGomb: {fileID: 1543880549} settingsGomb: {fileID: 644899047} shopGomb: {fileID: 835649272} @@ -5491,6 +5491,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1603739812} + - component: {fileID: 1603739814} + - component: {fileID: 1603739813} m_Layer: 0 m_Name: Cameras m_TagString: Untagged @@ -5517,6 +5519,110 @@ 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 @@ -5857,7 +5963,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1755630381} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.01, y: 7.4, z: 0.45} + m_LocalPosition: {x: -0.01, y: 7.17, z: 0.45} m_LocalScale: {x: 17.03, y: 1, z: 19.6} m_ConstrainProportionsScale: 0 m_Children: [] @@ -6372,8 +6478,6 @@ GameObject: - component: {fileID: 1895677328} - component: {fileID: 1895677327} - component: {fileID: 1895677329} - - component: {fileID: 1895677331} - - component: {fileID: 1895677330} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -6473,110 +6577,6 @@ MonoBehaviour: m_CameraActivatedEvent: m_PersistentCalls: m_Calls: [] ---- !u!82 &1895677330 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895677325} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: -8278190956376925970, guid: 911068ff86e0a0b4d8dae92436b938fa, type: 2} - m_audioClip: {fileID: 8300000, guid: bf33ceb4e70e33349bba9e70519c57e2, type: 3} - m_PlayOnAwake: 1 - m_Volume: 1 - m_Pitch: 1 - Loop: 1 - 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 &1895677331 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895677325} - m_Enabled: 1 --- !u!1 &1926637271 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/jatekmanager.cs b/Assets/Scripts/jatekmanager.cs index c918293..8288d17 100644 --- a/Assets/Scripts/jatekmanager.cs +++ b/Assets/Scripts/jatekmanager.cs @@ -8,6 +8,7 @@ using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Audio; +using Cinemachine; public class jatekmanager : MonoBehaviour { @@ -42,6 +43,8 @@ public class jatekmanager : MonoBehaviour private Timer timer; private CoinCounter cc; + [SerializeField] private CinemachineVirtualCamera homeCamera; + public AudioMixer audioMixer; @@ -197,6 +200,8 @@ public class jatekmanager : MonoBehaviour public void ChangeToGame() { + homeCamera.m_Lens.NearClipPlane = 0.3f; + homeGomb.SetActive(false); settingsGomb.SetActive(false); shopGomb.SetActive(false); @@ -205,7 +210,6 @@ public class jatekmanager : MonoBehaviour volumeSlide.SetActive(false); musicSlide.SetActive(false); sfxSlide.SetActive(false); - } IEnumerator TimerGame() @@ -222,8 +226,8 @@ public class jatekmanager : MonoBehaviour boby.transform.position = new Vector3(0, boby.transform.position.y, boby.transform.position.z); - GetComponent ().enabled = true; - GetComponent ().enabled = true; + GetComponent ().enabled = true; + GetComponent().enabled = true; goLeftButton.SetActive(true); @@ -232,9 +236,7 @@ public class jatekmanager : MonoBehaviour scoreText.gameObject.SetActive(true); timerText.gameObject.SetActive(true);; - timer.playTime.Start(); - } public void ChangeToMeghaltal() diff --git a/Assets/Scripts/portal.cs b/Assets/Scripts/portal.cs index 0d877e3..ca533d2 100644 --- a/Assets/Scripts/portal.cs +++ b/Assets/Scripts/portal.cs @@ -9,6 +9,10 @@ public class portal : MonoBehaviour void Awake() { gc = FindObjectOfType(); + + + + gameObject.GetComponent().material = gc.materials[gc.materialIndex]; } private void OnTriggerEnter(Collider other)