This repository was archived by the owner on Aug 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
SpawnPoint.cs
Erik edited this page Apr 25, 2019
·
5 revisions
Script: SpawnPoint.cs
- StartSpawning(GameObject go) - Currently public, should be protected instead. This is only needed by internal methods and derived classes.
- SpawnObject() - Spawns the configured objectPrefab. This can be overridden by a derived class to make a unique implementation.
- SpawnEnemiesControl() - Coroutine that spawns an object every spawnDelay seconds. Should be refactored to a more generic name.
- None
- objectPrefab - Object that will be spawned.
- maximumSpawns - Maximum number of objects this Spawn Point can spawn
- spawnDelay - Seconds between spawn.
- triggers - Array of all triggers that can initiate spawning.
When a player collides with a configured trigger StartSpawning is invoked. The basic SpawnPoint.cs spawns enemies every spawnDelay seconds, but this can be derived and the SpawnObject() method can be overridden to spawn and configure any prefab object. It is recommended to take advantage of the ObjectPooler.
Script Documentation
General Scripts
Generic Character Scripts
Enemy Scripts
Player Scripts
Erik's ongoing laundry list of TODOs that he doesn't want to create issues for