public void PlaySoundEvent(SOUNDID sid, GameObject go = null) { if (!hasSFX) { return; } if (!go) { go = gameObject; } //Debug.Log("SOUND: " + sid); switch (sid) { case SOUNDID.CLICK: SoundEventWrapper("Click", go); break; case SOUNDID.BACK: SoundEventWrapper("Back", go); break; case SOUNDID.STARTGAME: SoundEventWrapper("StartGame", go); break; case SOUNDID.AVATARSELECT: SoundEventWrapper("AvatarSelect", go); break; case SOUNDID.GACHACOUNT: SoundEventWrapper("GachaCount", go); AkSoundEngine.SetSwitch("GachaCount", UpdateGachaSwitch(), go); break; case SOUNDID.GACHAEND: SoundEventWrapper("GachaEnd", go); break; case SOUNDID.ICON_BOUGHT: SoundEventWrapper("BoughtIcon", go); break; case SOUNDID.ICON_CONFIRMED: SoundEventWrapper("Place_Confirm", go); break; case SOUNDID.ICON_HIGHLIGHTED: SoundEventWrapper("Place_Highlight", go); break; case SOUNDID.ICON_INVALID: SoundEventWrapper("Place_Invalid", go); break; case SOUNDID.WIN_BIGGRID: SoundEventWrapper("WinBigGrid", go); break; case SOUNDID.WIN_GAME: SoundEventWrapper("WinGame", go); break; case SOUNDID.COUNTDOWN: SoundEventWrapper("Countdown", go); break; case SOUNDID.BGM: SoundEventWrapper("PlayBGM", go); GlobalScript.Instance.isBGMPlaying = true; break; case SOUNDID.STARTGAME_FLASH: SoundEventWrapper("StartGame_Flash", go); break; case SOUNDID.STARTGAME_SCALING: SoundEventWrapper("StartGame_Scaling", go); break; case SOUNDID.GETPOINTS: SoundEventWrapper("GetPoints", go); break; case SOUNDID.CHANGETURN: SoundEventWrapper("ChangeTurn", go); break; case SOUNDID.STOPBGM: SoundEventWrapper("StopBGM", go); GlobalScript.Instance.isBGMPlaying = false; break; default: Debug.Log("Sound ID " + go + " does not exist"); break; } }
public void PlaySoundEvent(SOUNDID sid, GameObject go = null) { if (!go) { go = gameObject; } switch (sid) { case SOUNDID.MENU_CLICK: SoundEventWrapper("Menu_Click", go); break; case SOUNDID.MENU_START: VibrationManager.Vibrate(10); SoundEventWrapper("Menu_Start", go); UpdateBGM("InGame"); break; case SOUNDID.ACHIEVEMENT_GOT: SoundEventWrapper("Achievement_Got", go); break; case SOUNDID.SCORE_TICK: SoundEventWrapper("Score_Tick", go); break; case SOUNDID.SCORE_TICK_STOP: SoundEventWrapper("Score_Tick_Stop", go); break; case SOUNDID.GEM_LINK: SoundEventWrapper("Gem_Link", go); AkSoundEngine.SetRTPCValue("LinkCount", ++linkCount); break; case SOUNDID.GEM_LINK_FAIL: SoundEventWrapper("Gem_Link_Fail", go); linkCount = 1; AkSoundEngine.SetRTPCValue("LinkCount", linkCount); break; case SOUNDID.GEM_LINK_SUCCEED: SoundEventWrapper("Gem_Link_Succeed", go); linkCount = 1; AkSoundEngine.SetRTPCValue("LinkCount", linkCount); break; case SOUNDID.GEM_DROPPED: SoundEventWrapper("Gem_Dropped", go); break; case SOUNDID.GEM_TOUCHED: SoundEventWrapper("Gem_Touched", go); break; case SOUNDID.COMBO_LOST: SoundEventWrapper("Combo_Lost", go); break; case SOUNDID.COMBO_TICK: SoundEventWrapper("Combo_Tick", go); break; case SOUNDID.COMBO_TICK_STOP: SoundEventWrapper("Combo_Tick_Stop", go); break; case SOUNDID.FEVER_ENTER: SoundEventWrapper("Fever_Enter", go); break; case SOUNDID.FEVER_SUSTAIN: SoundEventWrapper("Fever_Sustain", go); break; case SOUNDID.FEVER_EXIT: SoundEventWrapper("Fever_Exit", go); break; case SOUNDID.FEVER_SUSTAIN_STOP: SoundEventWrapper("Fever_Sustain_Stop", go); break; case SOUNDID.BGM: SoundEventWrapper("BGM_Stop", go); SoundEventWrapper("BGM", go); break; case SOUNDID.BGM_STOP: SoundEventWrapper("BGM_Stop", go); break; default: Debug.Log("Sound ID " + go + " does not exist"); break; } }