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