spawn bullet closer to tank

This commit is contained in:
Vinzenz Schroeter 2024-04-16 20:24:29 +02:00
commit 786c974a23

View file

@ -4,7 +4,8 @@ internal sealed class BulletManager
{
private readonly HashSet<Bullet> _bullets = [];
public void Spawn(Bullet bullet) => _bullets.Add(bullet);
public void Spawn(Player tankOwner, FloatPosition position, double rotation)
=> _bullets.Add(new Bullet(tankOwner, position, rotation));
public IEnumerable<Bullet> GetAll() => _bullets;