A class in Root.Township, the global namespace.
Server-side generator that fills a dock with a random number of an item the first time the entity is generated.
Constructors
| Member | What it is |
|---|
DockByDefault() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private int countMax | Upper bound of the random count. |
private int countMin | Lower bound of the random count. Nothing spawns if the count is 0. |
private PickupDock dock | The dock to fill. |
private Item item | The item to spawn into the dock. |
Properties
| Member | What it is |
|---|
protected override bool IsGeneratingFirstTime { get; } | Always true, so it generates when the entity is first created. |
Methods
| Member | What it is |
|---|
protected override void Generate(SpawnData spawnData) | Spawns a random count of item into dock. The count is floored, so countMax is only reached when both bounds match. |