Initial Combat Implementation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Unity.Entities;
|
||||
using Unity.NetCode;
|
||||
|
||||
namespace ProjectM.Simulation
|
||||
{
|
||||
/// <summary>
|
||||
/// Hit points for any damageable ghost (players, training dummies). Server-authoritative:
|
||||
/// only server systems write <see cref="Current"/>; clients receive it via the [GhostField]
|
||||
/// for display and prediction reconciliation. <see cref="Max"/> is baked identically on both
|
||||
/// worlds and is not replicated. Added by PlayerBaker / TrainingDummyBaker.
|
||||
/// </summary>
|
||||
public struct Health : IComponentData
|
||||
{
|
||||
/// <summary>Current hit points. Replicated for display and reconciles the predicted value against the server's authoritative state.</summary>
|
||||
[GhostField] public float Current;
|
||||
|
||||
/// <summary>Maximum hit points. Baked identically on client and server; not replicated.</summary>
|
||||
public float Max;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user