Skip to content

Beeper manager

When awake, it iterates through all its children and binds controller names so that it knows what it can play and what not.

Monobehaviour

Awake

Iterates through all the children that have BeeperController script attached and get their names. It saves the name into BeeperControllers variable.

Variables

BeeperControllers

public Dictionary<string, BeeperController> BeeperControllers

List of all the BeeperController as well as their names as appears in BeeperName.

Functions

Play

void Play(string beeperName)

Tries to get a beepre controller of a certain name. If that controller exists, it plays one shot of that particular beeper. If not, returns KeyNotFoundException.