void SetRoleSexByProfessional() { if (m_ChooseIndex == ROLE_PROFESSION.ROLE_SJS || m_ChooseIndex == ROLE_PROFESSION.ROLE_GJS) { m_ChooseSex = ROLE_SEX.ROLE_FEMALE; } else { m_ChooseSex = ROLE_SEX.ROLE_MALE; } }
void OnTabChange(TabButton button) { int chooseIndex = ((int)m_ChooseIndex + 3) % 6; if (button.name == "boy") { m_ChooseSex = ROLE_SEX.ROLE_MALE; m_ChooseIndex = (ROLE_PROFESSION)chooseIndex; } else if (button.name == "girl") { m_ChooseSex = ROLE_SEX.ROLE_FEMALE; m_ChooseIndex = (ROLE_PROFESSION)chooseIndex; } RequestNewName(); RefreshCreateRolePanelInfo(chooseIndex); }
void Start() { RequestNewName(); FreshNewName(); //Default Choice m_ChooseIndex = ROLE_PROFESSION.ROLE_SJS; m_ChooseSex = ROLE_SEX.ROLE_FEMALE; m_MuiSelectPersonObj.onSelectOneItem = onSelectOneRoleItem; m_MuiSelectPersonObj.onBeginRotation = onSelectPanelBeginRotation; m_MuiSelectPersonObj.onSpringFinished = onSelectPanelFinishRotation; for (int i = 0; i < m_processNameArray.Length; i++) { m_processNameArray[i].text = Utils.GetLoginNameByIndex(i); } }