A class in Root.Township, the global namespace.
Server: spawns items from a pipeline in a ring around the entity on first generation, as saved children.
Constructors
| Member | What it is |
|---|
SpawnInCircle() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private ObjectPipeline items | Object pipeline that picks the prefab for each item. |
private float maxRadius | Largest ring radius. |
private float minRadius | Smallest ring radius. |
private int numOfItems | How many items to place round the ring. |
private Vector3 randomOffset | Extra random X and Z jitter per item. |
private bool shouldBeKinematic | Makes the spawned items' rigidbodies kinematic. |
Methods
| Member | What it is |
|---|
void CircleSpawn() | Spawns about numOfItems items spaced round a circle at random radii and offsets, with random Y rotation. |
override void InitializeAsServer(SpawnData spawnData) | Spawns the ring when the spawn data says this is a fresh generation. |