33 lines
896 B
C#
33 lines
896 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
using SideScrollerGame.Sim.Math;
|
|
|
|
namespace SideScrollerGame.Sim.Runtime;
|
|
|
|
[ExcludeFromCodeCoverage]
|
|
public sealed record PlayerSnapshot
|
|
{
|
|
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; }
|
|
|
|
public FixPointVector2 Position { get; init; }
|
|
|
|
public sbyte MoveAxisX { get; init; }
|
|
|
|
public sbyte MoveAxisY { get; init; }
|
|
|
|
public int Health { get; init; }
|
|
|
|
public FixPoint16 VerticalVelocity { get; init; }
|
|
|
|
public bool IsGrounded { get; init; }
|
|
} |