From 069aa7b2c36163fb47a61d7cde565daf591c1412 Mon Sep 17 00:00:00 2001 From: RochesterX Date: Mon, 3 Mar 2025 13:44:31 -0500 Subject: [PATCH] Small fixes --- Assets/Prefabs/DayNightSkyBackground.prefab | 2 +- Assets/Prefabs/Falling Platform.prefab | 2 +- Assets/Scripts/FallPlatform.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Prefabs/DayNightSkyBackground.prefab b/Assets/Prefabs/DayNightSkyBackground.prefab index 9b072e5..d12c2ac 100644 --- a/Assets/Prefabs/DayNightSkyBackground.prefab +++ b/Assets/Prefabs/DayNightSkyBackground.prefab @@ -1386,7 +1386,7 @@ Transform: m_GameObject: {fileID: 5636027701359458481} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 36, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Prefabs/Falling Platform.prefab b/Assets/Prefabs/Falling Platform.prefab index 8909e00..26baf10 100644 --- a/Assets/Prefabs/Falling Platform.prefab +++ b/Assets/Prefabs/Falling Platform.prefab @@ -260,7 +260,7 @@ BoxCollider2D: drawMode: 0 adaptiveTiling: 0 m_AutoTiling: 0 - m_Size: {x: 0.99981785, y: 0.056192875} + m_Size: {x: 0.9974469, y: 0.056192875} m_EdgeRadius: 0 --- !u!114 &5094694631672972304 MonoBehaviour: diff --git a/Assets/Scripts/FallPlatform.cs b/Assets/Scripts/FallPlatform.cs index 6d1ea0c..07699b1 100644 --- a/Assets/Scripts/FallPlatform.cs +++ b/Assets/Scripts/FallPlatform.cs @@ -15,7 +15,7 @@ public class FallPlatform : MonoBehaviour } private void OnTriggerEnter2D(Collider2D collision) { - if (!falling && collision.gameObject.CompareTag("Player")) + if (!falling/* && collision.gameObject.CompareTag("Player")*/) { StartCoroutine(FallAfterDelay()); } @@ -26,6 +26,7 @@ public class FallPlatform : MonoBehaviour falling = true; yield return new WaitForSeconds(fallDelay); rb.bodyType = RigidbodyType2D.Dynamic; - Destroy(gameObject, destroyDelay); + yield return new WaitForSeconds(destroyDelay); + Destroy(gameObject); } }