This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
servicepoint-tanks/TanksServer/Models/Tank.cs
Vinzenz Schroeter a9aaf899a2 separate tick steps
2024-04-07 19:52:16 +02:00

23 lines
539 B
C#

namespace TanksServer.Models;
internal sealed class Tank(Player player, FloatPosition spawnPosition)
{
private double _rotation;
public Player Owner { get; } = player;
/// <summary>
/// Bounds: 0 (inclusive) .. 16 (exclusive)
/// </summary>
public double Rotation
{
get => _rotation;
set => _rotation = (value + 16d) % 16d;
}
public FloatPosition Position { get; set; } = spawnPosition;
public DateTime NextShotAfter { get; set; }
public bool Moved { get; set; }
}