separate folders per functionality
This commit is contained in:
parent
7f00160780
commit
0ca6a91a7e
1 changed files with 60 additions and 113 deletions
15
TanksServer/GameLogic/BulletManager.cs
Normal file
15
TanksServer/GameLogic/BulletManager.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class BulletManager
|
||||
{
|
||||
private readonly HashSet<Bullet> _bullets = new();
|
||||
|
||||
public void Spawn(Bullet bullet) => _bullets.Add(bullet);
|
||||
|
||||
public IEnumerable<Bullet> GetAll() => _bullets;
|
||||
|
||||
public void RemoveWhere(Predicate<Bullet> predicate)
|
||||
{
|
||||
_bullets.RemoveWhere(predicate);
|
||||
}
|
||||
}
|
||||
Reference in a new issue