feat(gamecli): add ShipState record struct
This commit is contained in:
18
GameCli/Ship.cs
Normal file
18
GameCli/Ship.cs
Normal 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);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user