feat(gamecli): add ShipState record struct

This commit is contained in:
meelstorm
2026-07-17 16:42:26 +00:00
committed by EugeneTes
parent 83c6b0f41f
commit f31f01d321

18
GameCli/Ship.cs Normal file
View File

@@ -0,0 +1,18 @@
namespace GameCli;
/// <summary>
/// Immutable ship pose + velocity in world coordinates.
/// World is [0,1] × [0,1]. Y increases downward (screen-native).
/// Angle=0 means "ship pointing up" (main engine points down).
/// Positive angle rotates clockwise.
/// </summary>
public readonly record struct ShipState(
float X,
float Y,
float VX,
float VY,
float Angle,
float AngularVelocity)
{
public static ShipState AtCenter() => new(0.5f, 0.5f, 0f, 0f, 0f, 0f);
}