public static void OpenGameDifSelectForm() { CUIFormScript cUIFormScript = Singleton <CUIManager> .get_instance().OpenForm(CRoleRegisterSys.s_gameDifficultSelectFormPath, false, true); if (cUIFormScript != null) { GameObject gameObject = Utility.FindChild(cUIFormScript.gameObject, "ToggleGroup/Toggle1"); gameObject.GetComponent <CUIEventScript>().m_onClickEventParams.tag = 1; gameObject = Utility.FindChild(cUIFormScript.gameObject, "ToggleGroup/Toggle2"); gameObject.GetComponent <CUIEventScript>().m_onClickEventParams.tag = 2; gameObject = Utility.FindChild(cUIFormScript.gameObject, "ToggleGroup/Toggle3"); gameObject.GetComponent <CUIEventScript>().m_onClickEventParams.tag = 3; CRoleRegisterView.SetGameDifficult(0); } }
public void OnGameDifSelect(CUIEvent cuiEvent) { CRoleRegisterView.SetGameDifficult(cuiEvent.m_eventParams.tag); }