Add platformer locomotion slice

This commit is contained in:
2026-04-16 12:32:38 +02:00
parent 45181d1f78
commit 21a8b8bedb
15 changed files with 604 additions and 28 deletions

View File

@@ -6,13 +6,15 @@ namespace SideScrollerGame.Sim.Runtime;
[ExcludeFromCodeCoverage]
public sealed record PlayerSnapshot
{
public PlayerSnapshot(PlayerId playerId, FixPointVector2 position, sbyte moveAxisX, sbyte moveAxisY, int health)
public PlayerSnapshot(PlayerId playerId, FixPointVector2 position, sbyte moveAxisX, sbyte moveAxisY, int health, FixPoint16 verticalVelocity, bool isGrounded)
{
PlayerId = playerId;
Position = position;
MoveAxisX = moveAxisX;
MoveAxisY = moveAxisY;
Health = health;
VerticalVelocity = verticalVelocity;
IsGrounded = isGrounded;
}
public PlayerId PlayerId { get; init; }
@@ -24,4 +26,8 @@ public sealed record PlayerSnapshot
public sbyte MoveAxisY { get; init; }
public int Health { get; init; }
public FixPoint16 VerticalVelocity { get; init; }
public bool IsGrounded { get; init; }
}