Show / Hide Table of Contents

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
Namespace: GameSpawners
Assembly: cs.temp.dll.dll
Syntax
public class ObstacleSpawner : ScriptableObject

Constructors

ObstacleSpawner(List<ObstacleConfig>, Single, GameObject, Transform)

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
Back to top Generated by DocFX