![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Spawns boulders at a consistent rate at a given spawn point, facing upwards.
Documentation updated 8/26/2024
Public Attributes | |
Transform | boulderPrefab |
Reference to the prefab of the boulder which we want to spawn. | |
Transform | spawnPoint |
Reference to the point the boulder spawns at. | |
float | seconds = -1 |
Time until object despawns, in seconds. -1 to use the boulder prefab's default despawn time. | |
Private Member Functions | |
IEnumerator | BoulderSpawnTimer () |
Spawns a boulder every spawnCooldown seconds. | |
void | SpawnBoulder () |
Instantiates a boulder prefab and sets its up direction to this object's up direction. Also sets despawn time (if applicable). | |
void | Awake () |
Find the spawn point and set our reference to it. | |
void | Start () |
Starts the boulder spawner timer. | |
Private Attributes | |
float | spawnCooldown = 3f |
Time between each boulder spawn, in seconds. | |
bool | isSpawning = true |
True if the spawner is currently spawning boulders. | |
|
private |
Find the spawn point and set our reference to it.
|
private |
Spawns a boulder every spawnCooldown seconds.
|
private |
Instantiates a boulder prefab and sets its up direction to this object's up direction. Also sets despawn time (if applicable).
|
private |
Starts the boulder spawner timer.
Transform BoulderSpawner.boulderPrefab |
Reference to the prefab of the boulder which we want to spawn.
|
private |
True if the spawner is currently spawning boulders.
float BoulderSpawner.seconds = -1 |
Time until object despawns, in seconds. -1 to use the boulder prefab's default despawn time.
|
private |
Time between each boulder spawn, in seconds.
Transform BoulderSpawner.spawnPoint |
Reference to the point the boulder spawns at.