27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using Unity.Entities;
|
|
using Unity.Mathematics;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// Baked singleton describing the training-dummy field to spawn at world start. Consumed once by
|
|
/// the server-only TrainingDummySpawnSystem, which instantiates <see cref="Count"/> dummies from
|
|
/// <see cref="Prefab"/> and then destroys this singleton so the spawn runs exactly once. Not
|
|
/// replicated — dummies are spawned authoritatively on the server and reach clients as ghosts.
|
|
/// </summary>
|
|
public struct TrainingDummySpawner : IComponentData
|
|
{
|
|
/// <summary>Baked entity prefab to instantiate for each dummy.</summary>
|
|
public Entity Prefab;
|
|
|
|
/// <summary>Number of dummies to spawn.</summary>
|
|
public int Count;
|
|
|
|
/// <summary>World-unit gap between consecutive dummies along the spawn line (X axis).</summary>
|
|
public float Spacing;
|
|
|
|
/// <summary>World-space position of the first dummy; subsequent dummies offset by <see cref="Spacing"/>.</summary>
|
|
public float3 Origin;
|
|
}
|
|
}
|