position is now center, socket improvements

This commit is contained in:
Vinzenz Schroeter 2024-04-13 14:07:14 +02:00
commit d4d0abd013

View file

@ -1,10 +1,12 @@
namespace TanksServer.Models;
internal sealed class Bullet(Player tankOwner, FloatPosition position, double rotation): IMapEntity
internal sealed class Bullet(Player tankOwner, FloatPosition position, double rotation) : IMapEntity
{
public Player Owner { get; } = tankOwner;
public FloatPosition Position { get; set; } = position;
public double Rotation { get; set; } = rotation;
}
public FloatPosition Position { get; set; } = position;
public PixelBounds Bounds => new (Position.ToPixelPosition(), Position.ToPixelPosition());
}