Co-Op Layer
This commit is contained in:
@@ -16,6 +16,12 @@ namespace ProjectM.Authoring
|
||||
|
||||
public Vector3 SpawnPoint = Vector3.zero;
|
||||
|
||||
[Tooltip("Radius (m) of the co-op spawn ring; players land on distinct slots so they don't stack.")]
|
||||
public float SpawnRingRadius = 2.5f;
|
||||
|
||||
[Tooltip("Evenly-spaced ring positions before players spill onto an outer ring.")]
|
||||
public int RingSlots = 4;
|
||||
|
||||
private class PlayerSpawnerBaker : Baker<PlayerSpawnerAuthoring>
|
||||
{
|
||||
public override void Bake(PlayerSpawnerAuthoring authoring)
|
||||
@@ -26,7 +32,9 @@ namespace ProjectM.Authoring
|
||||
AddComponent(entity, new PlayerSpawner
|
||||
{
|
||||
PlayerPrefab = GetEntity(authoring.PlayerPrefab, TransformUsageFlags.Dynamic),
|
||||
SpawnPoint = authoring.SpawnPoint
|
||||
SpawnPoint = authoring.SpawnPoint,
|
||||
SpawnRingRadius = authoring.SpawnRingRadius,
|
||||
RingSlots = authoring.RingSlots
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user