public void OnClickOnButton(string eventName) { SoundManager.instance.PlaySound(SoundType.Click); switch (eventName) { case "back": { InGameUiManager.instance.DestroyScreen(InGameScreens.TableSettings); } break; case "voicemsg": { if (isVociemsg == 1) { isVociemsg = 0; Voiceon.SetActive(false); VoiceOff.SetActive(true); } else { isVociemsg = 1; Voiceon.SetActive(true); VoiceOff.SetActive(false); } } break; case "textmsg": { if (isTextmsg == 1) { isTextmsg = 0; Texton.SetActive(false); TextOff.SetActive(true); } else { isTextmsg = 1; Texton.SetActive(true); TextOff.SetActive(false); } } break; case "soundEffect": { if (issound == 1) { issound = 0; PlayerPrefs.SetInt("issound", issound); soundon.SetActive(false); soundOff.SetActive(true); } else { issound = 1; PlayerPrefs.SetInt("issound", issound); soundon.SetActive(true); soundOff.SetActive(false); } } break; case "vibration": { if (isvibrations == 1) { isvibrations = 0; vibrationon.SetActive(false); vibrationOff.SetActive(true); } else { isvibrations = 1; vibrationon.SetActive(true); vibrationOff.SetActive(false); } } break; case "guesyournext": { if (isguesyourNexthand == 1) { isguesyourNexthand = 0; guseyournexton.SetActive(false); guseyournextOff.SetActive(true); } else { isguesyourNexthand = 1; guseyournexton.SetActive(true); guseyournextOff.SetActive(false); } } break; case "Exactbetting": { if (isexactBetting == 1) { isexactBetting = 0; exactBettingon.SetActive(false); exactBettingOff.SetActive(true); } else { isexactBetting = 1; exactBettingon.SetActive(true); exactBettingOff.SetActive(false); } } break; case "customizedaction": { if (iscustomizedActionbtn == 1) { iscustomizedActionbtn = 0; customizedActionbtnon.SetActive(false); customizedActionbtnOff.SetActive(true); RaiseSlider.SetActive(false); betSlider.SetActive(false); } else { RaiseSlider.SetActive(true); betSlider.SetActive(true); iscustomizedActionbtn = 1; customizedActionbtnon.SetActive(true); customizedActionbtnOff.SetActive(false); } } break; default: { Debug.LogError("Unhandled eventName found in TableSettingsUiManager = " + eventName); } break; } AllPlayerPrefs(); }
void LoadResetTableData() { if (ts.IsVociemsg == 1) { Voiceon.SetActive(true); VoiceOff.SetActive(false); } else { Voiceon.SetActive(false); VoiceOff.SetActive(true); } if (ts.IsTextmsg == 1) { Texton.SetActive(true); TextOff.SetActive(false); } else { Texton.SetActive(false); TextOff.SetActive(true); } if (ts.Issound == 1) { soundon.SetActive(true); soundOff.SetActive(false); } else { soundon.SetActive(false); soundOff.SetActive(true); } if (ts.Isvibrations == 1) { vibrationon.SetActive(true); vibrationOff.SetActive(false); } else { vibrationon.SetActive(false); vibrationOff.SetActive(true); } if (ts.IsguesyourNexthand == 1) { guseyournexton.SetActive(true); guseyournextOff.SetActive(false); } else { guseyournexton.SetActive(false); guseyournextOff.SetActive(true); } if (ts.IsexactBetting == 1) { exactBettingon.SetActive(true); exactBettingOff.SetActive(false); } else { exactBettingon.SetActive(false); exactBettingOff.SetActive(true); } if (ts.IscustomizedActionbtn == 1) { customizedActionbtnon.SetActive(true); customizedActionbtnOff.SetActive(false); RaiseSlider.SetActive(true); betSlider.SetActive(true); } else { RaiseSlider.SetActive(false); betSlider.SetActive(false); customizedActionbtnon.SetActive(false); customizedActionbtnOff.SetActive(true); } issound = ts.Issound; isVociemsg = ts.IsVociemsg; isTextmsg = ts.IsTextmsg; isvibrations = ts.Isvibrations; isguesyourNexthand = ts.IsguesyourNexthand; isexactBetting = ts.IsexactBetting; iscustomizedActionbtn = ts.IscustomizedActionbtn; israise = ts.Israise; }