From 516c245e18f9aac902da3157cbc65c2ce3112a64 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:10:14 +0200 Subject: [PATCH] fixed! (#504) --- Assets/Scripts/Games/WizardsWaltz/Plant.cs | 1 + Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Games/WizardsWaltz/Plant.cs b/Assets/Scripts/Games/WizardsWaltz/Plant.cs index bb15ec239..590c7f00f 100644 --- a/Assets/Scripts/Games/WizardsWaltz/Plant.cs +++ b/Assets/Scripts/Games/WizardsWaltz/Plant.cs @@ -92,6 +92,7 @@ namespace HeavenStudio.Games.Scripts_WizardsWaltz { yield return new WaitForSeconds(Conductor.instance.secPerBeat * game.beatInterval / 2f); Destroy(gameObject); + game.currentPlants.Remove(this); } } } \ No newline at end of file diff --git a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs index 3c218f9a5..911e48588 100644 --- a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs +++ b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs @@ -65,7 +65,7 @@ namespace HeavenStudio.Games public float zRange = 5; public float yRange = 0.5f; public float plantYOffset = -2f; - private List currentPlants = new(); + [NonSerialized] public List currentPlants = new(); public static WizardsWaltz instance;