add bullet timeout

This commit is contained in:
Vinzenz Schroeter 2024-04-19 13:32:41 +02:00
parent 61f90b99af
commit 0aac6f780b
4 changed files with 20 additions and 3 deletions

View file

@ -1,6 +1,6 @@
namespace TanksServer.Models;
internal sealed class Bullet(Player tankOwner, FloatPosition position, double rotation, bool isExplosive) : IMapEntity
internal sealed class Bullet(Player tankOwner, FloatPosition position, double rotation, bool isExplosive, DateTime timeout) : IMapEntity
{
public Player Owner { get; } = tankOwner;
@ -10,5 +10,7 @@ internal sealed class Bullet(Player tankOwner, FloatPosition position, double ro
public bool IsExplosive { get; } = isExplosive;
public DateTime Timeout { get; } = timeout;
public PixelBounds Bounds => new (Position.ToPixelPosition(), Position.ToPixelPosition());
}