Update .gitignore to exclude TypeScript build info and add dist directory. Expand README with project overview, technology stack, prerequisites, and instructions for running and testing the application.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace HSchool.Simulation.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Stable replication id. Arch entity ids are recycled, so the client gets this
|
||||
/// monotonically increasing value instead.
|
||||
/// </summary>
|
||||
public struct NetworkId
|
||||
{
|
||||
public uint Value;
|
||||
|
||||
public NetworkId(uint value) => Value = value;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using HSchool.Protocol;
|
||||
|
||||
namespace HSchool.Simulation.Components;
|
||||
|
||||
/// <summary>Marks an entity as driven by a connected client's input.</summary>
|
||||
public struct PlayerControl
|
||||
{
|
||||
/// <summary>Network id of the owning connection.</summary>
|
||||
public uint PlayerId;
|
||||
|
||||
/// <summary>Latest intent received from that connection.</summary>
|
||||
public InputButtons Buttons;
|
||||
|
||||
/// <summary>Sequence number of that intent; reserved for prediction/reconciliation.</summary>
|
||||
public uint LastInputSequence;
|
||||
|
||||
/// <summary>Movement speed in units per second.</summary>
|
||||
public float Speed;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace HSchool.Simulation.Components;
|
||||
|
||||
/// <summary>World-space position in simulation units.</summary>
|
||||
public struct Position
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
|
||||
public Position(float x, float y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using HSchool.Protocol;
|
||||
|
||||
namespace HSchool.Simulation.Components;
|
||||
|
||||
/// <summary>Everything the client needs to draw the entity; replicated verbatim in snapshots.</summary>
|
||||
public struct Renderable
|
||||
{
|
||||
public EntityKind Kind;
|
||||
public float Radius;
|
||||
|
||||
/// <summary>Packed 0x00RRGGBB.</summary>
|
||||
public uint Color;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace HSchool.Simulation.Components;
|
||||
|
||||
/// <summary>Simulation units per second, integrated by <c>MovementSystem</c>.</summary>
|
||||
public struct Velocity
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
|
||||
public Velocity(float x, float y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user