From bf8ae249271cfa6009c06773a6348ccc759e4a1c Mon Sep 17 00:00:00 2001 From: Aytackydln Date: Tue, 17 Dec 2024 21:02:19 +0100 Subject: [PATCH] fix InteractiveParticleLayerHandler only showing on pressed key --- .../Settings/Layers/InteractiveParticleLayerHandler.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/InteractiveParticleLayerHandler.cs b/Project-Aurora/Project-Aurora/Settings/Layers/InteractiveParticleLayerHandler.cs index 752734512..301db980f 100644 --- a/Project-Aurora/Project-Aurora/Settings/Layers/InteractiveParticleLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Settings/Layers/InteractiveParticleLayerHandler.cs @@ -23,9 +23,11 @@ private void KeyDown(object? sender, KeyboardKeyEventArgs e) { _awaitingKeys.Enqueue(e.GetDeviceKey()); } - protected override void SpawnParticles(double dt) { - foreach (var key in _awaitingKeys) { - Properties._Sequence = new KeySequence(new[] { key }); + protected override void SpawnParticles(double dt) + { + var particleCount = _awaitingKeys.Count; + for (var n = 0; n < particleCount; n++) + { var count = Rnd.Next(Properties.MinSpawnAmount, Properties.MaxSpawnAmount); for (var i = 0; i < count; i++) SpawnParticle();