top of page

Obstacle Manager

The obstacle manager is responsible for the spawning of obstacles and placing of collectables at runtime. It stores and remembers the previously spawned obstacles, collectable and their associated data, so that they may be respawned at the correct time and place, with all of the correct data, when the player is returning to the Hive.
It can do the following:​​

​

  • Load an Obstacle

    • Spawn the objects from a randomly selected obstacle into the scene.

  • Load a Specific Obstacle

    • Spawn the objects from a chosen obstacle into the scene.​

  • Load a Previous Obstacle

    • Spawn an obstacle previously made, including data about randomly placed collectables​

  • Generate Collectables.

    • Spawn a randomly chosen collectable, and place it randomly into a free space within an obstacle.​

​

Obstacle Manager Code

ObstacleManagerStartCode.png
ObstacleManagerAwake.png
ActivateBackgroundFunction.png

Obstacle Code

Obstacle Info Code

Saveable Object Code

Saveable Object Info Code

Saveable Object Prefab Code

Obstacle Box Code

ObstacleBoxScript.png

Parallax Mover Code

bottom of page