Skip to content

Commit

Permalink
fix InteractiveParticleLayerHandler only showing on pressed key
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Dec 17, 2024
1 parent 5535e6e commit bf8ae24
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bf8ae24

Please sign in to comment.