tank movement (without collision)
This commit is contained in:
parent
a3bd582b2e
commit
54b840da3e
1 changed files with 315 additions and 248 deletions
|
|
@ -1,8 +1,16 @@
|
|||
namespace TanksServer.Models;
|
||||
|
||||
internal sealed class Tank(Player player, PixelPosition spawnPosition)
|
||||
internal sealed class Tank(Player player, FloatPosition spawnPosition)
|
||||
{
|
||||
private double _rotation;
|
||||
|
||||
public Player Owner { get; } = player;
|
||||
public int Rotation { get; set; }
|
||||
public PixelPosition Position { get; set; } = spawnPosition;
|
||||
|
||||
public double Rotation
|
||||
{
|
||||
get => _rotation;
|
||||
set => _rotation = value % 16d;
|
||||
}
|
||||
|
||||
public FloatPosition Position { get; set; } = spawnPosition;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue