Class ObstacleSpawner
Contains note mapping data and spawns obstacles at the correct time.The updating is triggered from the 'Game' object,
which contains the main loop updating the spawner objects.
Inheritance
System.Object
ObstacleSpawner
Assembly: cs.temp.dll.dll
Syntax
public class ObstacleSpawner : ScriptableObject
Constructors
Declaration
public ObstacleSpawner(List<ObstacleConfig> obstacleData, float bps, GameObject obstacle, Transform generated)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<ObstacleConfig> |
obstacleData |
|
| System.Single |
bps |
|
| GameObject |
obstacle |
|
| Transform |
generated |
|
Fields
OBSTACLE_DISTANCE
Declaration
public const float OBSTACLE_DISTANCE = 40F
Field Value
| Type |
Description |
| System.Single |
|
OBSTACLE_TRAVEL_TIME
Declaration
public const float OBSTACLE_TRAVEL_TIME = 3F
Field Value
| Type |
Description |
| System.Single |
|
Methods
checkObstaclesSpawnable(Single)
Declaration
public void checkObstaclesSpawnable(float timePassed)
Parameters
| Type |
Name |
Description |
| System.Single |
timePassed |
|
getRelativeTravelTime()
Declaration
public float getRelativeTravelTime()
Returns
| Type |
Description |
| System.Single |
|