From 812ebac4c9817327f4220bc2f0c88e5fbda53be2 Mon Sep 17 00:00:00 2001 From: doodlechaos Date: Sun, 3 Mar 2024 18:19:05 -0600 Subject: [PATCH] Fixed bug in bucket switcher --- Assets/Scripts/Games/BucketSwitcherGame.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Games/BucketSwitcherGame.cs b/Assets/Scripts/Games/BucketSwitcherGame.cs index 4c59b408..0e6ad7a6 100644 --- a/Assets/Scripts/Games/BucketSwitcherGame.cs +++ b/Assets/Scripts/Games/BucketSwitcherGame.cs @@ -170,8 +170,11 @@ private void ResetBottomCollider(PBEffector effector) { GameObject bottom = effector.transform.Find("Bottom").gameObject; + if (bottom == null) + return; + BoxCollider2D collider = bottom.GetComponent(); - if (collider = null) + if (collider == null) return; if (effector.GetEffect().HasFlag(PBEffect.Add))