show tank infos in client

This commit is contained in:
Vinzenz Schroeter 2024-04-22 19:44:28 +02:00
parent a50a9770c9
commit 0f4eec6343
9 changed files with 73 additions and 26 deletions

View file

@ -1,3 +1,15 @@
namespace TanksServer.Models;
internal sealed record class PlayerInfo(string Name, Scores Scores, PlayerControls Controls);
internal sealed record class TankInfo(
int Orientation,
byte ExplosiveBullets,
PixelPosition Position,
bool Moving
);
internal sealed record class PlayerInfo(
string Name,
Scores Scores,
PlayerControls Controls,
TankInfo? Tank
);

View file

@ -22,7 +22,7 @@ internal sealed class Tank(Player player, FloatPosition spawnPosition) : IMapEnt
public DateTime NextShotAfter { get; set; }
public bool Moved { get; set; }
public bool Moving { get; set; }
public FloatPosition Position { get; set; } = spawnPosition;