Skip to content

Commit f871f5e

Browse files
committed
more features for the ParticleCollection
1 parent bf3364b commit f871f5e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

BenMakesGames.PlayPlayMini.GraphicsExtensions/BenMakesGames.PlayPlayMini.GraphicsExtensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Company>Ben Hendel-Doying</Company>
66
<Description>Some GraphicsManager extensions for PlayPlayMini.</Description>
77
<Copyright>2023-2025 Ben Hendel-Doying</Copyright>
8-
<Version>6.2.0</Version>
8+
<Version>6.2.1</Version>
99

1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
<PackageTags>monogame playplaymini graphics extensions animations text</PackageTags>

BenMakesGames.PlayPlayMini.GraphicsExtensions/ParticleEffects/ParticleCollection.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ public void AddParticles(params IEnumerable<IParticle> particle)
3434
SpawnQueue.AddRange(particle);
3535
}
3636

37+
/// <summary>
38+
/// Clears all particles, including those queued for spawning.
39+
/// </summary>
40+
public void Clear()
41+
{
42+
Particles.Clear();
43+
SpawnQueue.Clear();
44+
}
45+
46+
/// <summary>
47+
/// Returns true if there are no particles in the collection, including those queued for spawning.
48+
/// </summary>
49+
public bool IsEmpty => Particles.Count == 0 && SpawnQueue.Count == 0;
50+
3751
/// <summary>
3852
/// Updates all particles in the collection.
3953
/// </summary>

0 commit comments

Comments
 (0)