Add platformer locomotion slice
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user