BackgroundMusic.setParameterValue("dynamics", value); //Sets the received value to the “dynamics” parameter
Debug.Log("Change Music Dynamics to " + value);
For the first dungeon, there are two puzzles that must be solved in order to progress through the level. The Music system changes as these puzzles are completed. This is achieved by the ActivatePuzzle() method, which sends out the correspondent MusicDynamics value to the AudioManager script, where the ChangeMusicDynamics() method is called.
public void ActivatePuzzle()
activated = true; //Puzzle is completed
if (AudioManager.thisInstance != null)
AudioManager.thisInstance.ChangeMusicDynamics (MusicDynamics); //Calls out the ChangeMusicDynamics() method from the AudioManager script, with the MusicDynamics value
On this level, the player must activate a set of levers in a specific order, in order to open the main door to the dungeon main boss.
As the player advances or retracts in the correct order, the dynamics parameter value is gradually increased or decreased. This changes the volume of the various layers. Transitions are used for smooth fades of the loops.
When the puzzle is complete the value 1.0 is sent to the event which plays the final stinger, as the door opens. The event finishes in a trapped loop with silence, to accentuate the tension as the player approaches the main dungeon boss.