Skip to content

Manager Prefabs

JA-Dempsey edited this page Aug 8, 2023 · 1 revision

What are Managers?

In this case, we made prefabs that contain the objects and script necessary to manage some aspect of the game, including menus, spawners, and other overarching systems. They don't need to be named managers, but they must be in charge of some part of the gameplay, or some necessary asset (such as background music).

All of these prefabs will have the standard Transform, and some may have other standard components used, but this document will focus on the unique parts of each that deal with what the prefab actually does in the game, rather than just its position or other element.

Gameplay Managers

The following managers deal with overarching gameplay elements.

AudioManager

Meant to control the background music throughout the game.

image

The main options, other than several controls for the audio source, would be pointing the Script and Source to the desired background music.

ScoreManager

Manages the score during gameplay. Responsible for getting the information on enemies and updating that. The prefab itself has an option to indicate the current score and the text to reference for updating.

image

Wave Manager

Manages the waves of enemies and when they should appear. Determines when a wave ends, and provides the next wave for the player to experience.

image

Name Description
Enemy Spawner, Debris Spawner, Powerup Spawner, Wave Text Display, Enemies Remaining Text, Wave Textbackground These all refer to GameObjects for that named item
Wave The wave number when the scene loads, can be used to emulate waves for testing
Delay Between Ways Edits the delay between waves so the player can prepare for it

Spawners

Relating to spawning of other objects

Enemy Spawner

Deals with spawning enemies in the main gameplay scene.

image

Name Description
Num Objects How many of an object to spawn
Spawn Target The target used for calculations to determine spawn location
Boundaries The boundary of the play area
Spawn at boundary Enforce spawning at boundary
Boundary Offset Space from the boundary
Min Y Up/Down, or Y-axis point of creation
Prefabs The type of object to spawn, in this case an Enemy prefab
Aim Target The target the enemies will shoot at

Debris Spawner

Prefab that helps to spawn debris to help the player hide behind shots if they so desire. Note they use the same spawner script as the EnemySpawner above, but have different options activated.

image

Name Description
Num Objects How many of an object to spawn
Spawn Target The target used for calculations to determine spawn location
Boundaries The boundary of the play area
Spawn at boundary Enforce spawning at boundary
Boundary Offset Space from the boundary
Min Y Up/Down, or Y-axis point of creation
Prefabs The type of object to spawn, in this case an debris prefabs
Aim Target Left with no object, as debris should not be shooting at the player

Powerup Spawner

Handles the spawning of powerups. Provides ways to edit how spawns work to some extent. Spawns occur in a circle area around the Spawn Center Game object.

image

Name Description
Base Time Per Spawn Default spawn time, as waves arrive this will get larger. The smallest powerup spawn rate will be
Time Wave Modifier A modifier X that increases the amount of time needed to spawn a powerup by this modifier times the current wave
Spawn Center GameObject. Powerups will spawn around this given gameObject
Boundaries The Boundaries GameObject/Prefab. Used to get the location of the boundaries
Prefabs Array of powerup prefabs to spawn. One of these options will be chosen randmly to spawn
Area Reduction Mod Reduces the spawn area by this amount, division from the boundary area

Clone this wiki locally