A class in Root.Township, Alta.Intelligence.
On a gotera or fern: spawns its SeedSpray as a child entity on the server and fires it on request while the creature lives.
Constructors
| Member | What it is |
|---|
SeedSprayManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private HealthObject healthObject | The creature's health, checked before shooting and passed to the spray. |
private NetworkPrefab prefab | The seed spray prefab to spawn. |
private SeedSpray spray | The spawned spray. |
Methods
| Member | What it is |
|---|
override void InitializeAsServer(SpawnData spawnData) | Server: spawns the spray prefab under this transform (not saved), sets its shooter from the prefab root's ITargetPointer, and gives it the health object. |
void Shoot() | Server: fires the spray if the creature's health is above 0. Called from animation and network events on the prefab. |