position is now center, socket improvements
This commit is contained in:
parent
40eba7a7c7
commit
d4d0abd013
1 changed files with 129 additions and 101 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue