servicepoint-tanks/tanks-backend/TanksServer/Models/Bullet.cs

17 lines
526 B
C#
Raw Normal View History

namespace TanksServer.Models;
2024-04-19 13:32:41 +02:00
internal sealed class Bullet(Player tankOwner, FloatPosition position, double rotation, bool isExplosive, DateTime timeout) : IMapEntity
{
2024-04-07 21:09:36 +02:00
public Player Owner { get; } = tankOwner;
2024-04-17 19:34:19 +02:00
public double Rotation { get; } = rotation;
public FloatPosition Position { get; set; } = position;
2024-04-17 19:34:19 +02:00
public bool IsExplosive { get; } = isExplosive;
2024-04-19 13:32:41 +02:00
public DateTime Timeout { get; } = timeout;
public PixelBounds Bounds => new (Position.ToPixelPosition(), Position.ToPixelPosition());
}