File upandaway/components/skyflyspawner.lua
Component for spawning things on flowers.
Author:
Functions
Tables
Functions
- SkyflySpawner:GetDelay ()
-
Returns the delay, possibly calling the configured one.
- SkyflySpawner:GetSpawnFlower ()
-
Gets a flower to spawn a fly on.
- SkyflySpawner:Reboot ()
-
Stops spawning and then calls Touch().
- SkyflySpawner:SetDelay (dt)
-
Sets the delay between spawns.
Parameters
-
dt: A positive number or a function, receiving self.inst and returning the delay.
- SkyflySpawner:SetFlyPrefab (prefab)
-
Sets the fly prefab.
Parameters
- SkyflySpawner:SetMaxDistance (ds)
-
Maximum distance from player to spawn.
Parameters
- SkyflySpawner:SetMaxFlies (n)
-
Sets the fly cap.
Parameters
- SkyflySpawner:SetMinDistance (ds)
-
Minimum distance from player to spawn.
Parameters
- SkyflySpawner:SetMinFlySpread (ds)
-
Minimum distance between flies.
Parameters
- SkyflySpawner:SetPersistence (b)
-
Sets whether entities spawned should be kept across reloading.
Parameters
- SkyflySpawner:StartSpawning ()
-
Sets up the spawning task.
- SkyflySpawner:StopSpawning ()
-
Stops the spawning task, if any.
- SkyflySpawner:Touch ()
-
Starts or stops spawning according to the number of flies already tracked.
- SkyflySpawner:Track (fly)
-
Adds a fly to the tracking list, if it's not there already. Sets up "entitysleep" and "enterlimbo" callbacks for removing it.
Parameters
- SkyflySpawner:Untrack (fly)
-
Removes a fly from the tracking list. Removes the event listeners.
Parameters
Tables
- SkyflySpawner
- Component for spawning things on flowers.