Vixen
caa30e12
csharp
public sealed class Spawner

One camp: what is alive, and what is due back.

Read the guide page for this →

Remarks

⚠ It says what to spawn and never where. Placing something needs the scene and a navigation mesh, and a spawner that owned those would be a second one — the boundary every library in this framework sits on.

⚠ A respawn timer starts when something dies, not on the tick that notices. A server that fell behind would otherwise repopulate faster than one that did not, which is a difference players feel and nobody can explain.

⚠ The cap counts what is alive, not what has been spawned. Counting spawns makes a camp that has been cleared twice permanently empty.

Fields and properties (4)

  • public SpawnTable Table

    What lives here.

  • public int Alive

    How many are alive.

  • public int Free

    How many could still be.

  • public bool IsFull

    Whether it is full.

Methods (5)

  • public Spawner(SpawnTable table, ulong seed)

    Makes one, empty and due immediately.

  • public int Tick(float now, ICollection<SpawnOrder> into)

    Puts back whatever is due, and says what to make.

  • public bool Died(int slot, float now)

    Says something died.

  • public void Reset(float now)

    Clears everything and makes it all due at once. What a reset does.

  • public float DueAt(int slot)

    When a slot is due back.

Used by (1)

  • SpawnTestsVixen.Gameplay.Ai.Tests