-
Notifications
You must be signed in to change notification settings - Fork 14
Setting
HoangVanThu edited this page Jun 17, 2024
·
7 revisions
- SoundController.cs is used to handle sound in game.
- There are 2 types of sounds:
- Background music: this is the sound of long music segments played continuously or repeated during gameplay.
- Effect sound: this is the sound for effects. It's usually short and played when there is an interaction or effect happening in the game.
- To turn on/off music in setting:
Data.PlayerData.MusicState = true;
// or
Data.BgSoundState = false;
- To turn on/off sound in setting:
Data.PlayerData.SoundState = true;
// or
Data.PlayerData.SoundState = false;
- To play music:
SoundController.Instance.PlayBackground(SoundName.Introduction);
- To play sound fx:
SoundController.Instance.PlayFx(SoundName.Shoot);