From e16413b2da4b3f55140d8a35853cf9453205703d Mon Sep 17 00:00:00 2001 From: JoansLink00 Date: Fri, 23 Jan 2026 16:27:57 +0100 Subject: [PATCH] Goat and Pit --- Assets/Scripts/Goal.cs | 13 +++++++++++ Assets/Scripts/Goal.cs.meta | 2 ++ Assets/Scripts/Pit.cs | 35 +++++++++++++++++++--------- Assets/Settings/Mobile_RPAsset.asset | 14 ++++++++--- ProjectSettings/TagManager.asset | 29 +++-------------------- 5 files changed, 53 insertions(+), 40 deletions(-) create mode 100644 Assets/Scripts/Goal.cs create mode 100644 Assets/Scripts/Goal.cs.meta diff --git a/Assets/Scripts/Goal.cs b/Assets/Scripts/Goal.cs new file mode 100644 index 0000000..1cc69eb --- /dev/null +++ b/Assets/Scripts/Goal.cs @@ -0,0 +1,13 @@ +using System; +using UnityEngine; + +public class Goal : MonoBehaviour +{ + private void OnTriggerEnter(Collider other) + { + if (other.tag == "IceBlock") + { + Debug.Log("Win"); + } + } +} diff --git a/Assets/Scripts/Goal.cs.meta b/Assets/Scripts/Goal.cs.meta new file mode 100644 index 0000000..c502898 --- /dev/null +++ b/Assets/Scripts/Goal.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d66d4e72f6fa56b4788ea9a4017bfb8f \ No newline at end of file diff --git a/Assets/Scripts/Pit.cs b/Assets/Scripts/Pit.cs index 78a0cde..af46bd7 100644 --- a/Assets/Scripts/Pit.cs +++ b/Assets/Scripts/Pit.cs @@ -1,17 +1,30 @@ +using System; using UnityEngine; public class Pit : MonoBehaviour { - public PlayerMove player; - public IceBlockPush ice; + public PlayerMove player; + public IceBlockPush ice; + // + // // Update is called once per frame + // void Update() + // { + // if (Input.GetKeyDown(KeyCode.Space)) + // { + // player.Reset(); + // ice.Reset(); + // } + // } - // Update is called once per frame - void Update() - { - if (Input.GetKeyDown(KeyCode.Space)) - { - player.Reset(); - ice.Reset(); - } - } + private void OnTriggerEnter(Collider other) + { + if (other.GetComponent()) + { + player.Reset(); + } + else if(other.GetComponent()) + { + ice.Reset(); + } + } } diff --git a/Assets/Settings/Mobile_RPAsset.asset b/Assets/Settings/Mobile_RPAsset.asset index 7ceffe7..fedee07 100644 --- a/Assets/Settings/Mobile_RPAsset.asset +++ b/Assets/Settings/Mobile_RPAsset.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: Mobile_RPAsset m_EditorClassIdentifier: - k_AssetVersion: 12 - k_AssetPreviousVersion: 12 + k_AssetVersion: 13 + k_AssetPreviousVersion: 13 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -53,6 +53,7 @@ MonoBehaviour: m_AdditionalLightsShadowResolutionTierHigh: 1024 m_ReflectionProbeBlending: 1 m_ReflectionProbeBoxProjection: 1 + m_ReflectionProbeAtlas: 1 m_ShadowDistance: 50 m_ShadowCascadeCount: 1 m_Cascade2Split: 0.25 @@ -78,11 +79,11 @@ MonoBehaviour: m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 + m_AllowPostProcessAlphaOutput: 0 m_UseFastSRGBLinearConversion: 1 m_SupportDataDrivenLensFlare: 1 m_SupportScreenSpaceLensFlare: 1 m_GPUResidentDrawerMode: 0 - m_UseLegacyLightmaps: 0 m_SmallMeshScreenPercentage: 0 m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0 m_ShadowType: 1 @@ -109,6 +110,7 @@ MonoBehaviour: m_PrefilterDebugKeywords: 1 m_PrefilterWriteRenderingLayers: 1 m_PrefilterHDROutput: 1 + m_PrefilterAlphaOutput: 0 m_PrefilterSSAODepthNormals: 1 m_PrefilterSSAOSourceDepthLow: 1 m_PrefilterSSAOSourceDepthMedium: 0 @@ -126,8 +128,14 @@ MonoBehaviour: m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 + m_PrefilterScreenSpaceIrradiance: 0 m_PrefilterNativeRenderPass: 1 m_PrefilterUseLegacyLightmaps: 0 + m_PrefilterBicubicLightmapSampling: 0 + m_PrefilterReflectionProbeRotation: 0 + m_PrefilterReflectionProbeBlending: 0 + m_PrefilterReflectionProbeBoxProjection: 0 + m_PrefilterReflectionProbeAtlas: 0 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 m_Textures: diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 6413d11..40d9f69 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -2,8 +2,9 @@ %TAG !u! tag:unity3d.com,2011: --- !u!78 &1 TagManager: - serializedVersion: 2 - tags: [] + serializedVersion: 3 + tags: + - IceBlock layers: - Default - TransparentFX @@ -50,27 +51,3 @@ TagManager: - Light Layer 5 - Light Layer 6 - Light Layer 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -