void OnShowRightChange() { var iter = m_dicRightItem.GetEnumerator(); while (iter.MoveNext()) { var dic = iter.Current; RightSkillItem item = dic.Value; if (m_bRightChange) { uint level = item.GetUnLockLevel(); if (level > MainPlayerHelper.GetPlayerLevel()) { item.SetItemState(RightLearnSkillItemState.Lock); } else { item.SetItemState(RightLearnSkillItemState.SetRightCanChange); } } else { item.ResetState(); } } }
void OnRightItemClick(GameObject go) { int loc = skilldataManager.GetLocation(go.name); uint level = skilldataManager.GetUnLockLevelByLoc((uint)loc); if (level > MainPlayerHelper.GetPlayerLevel()) { return; } if (!BRightChange && !BLeftChange) { BLeftChange = true; } RightSkillItem rightItem = go.GetComponent <RightSkillItem>(); if (rightItem != null) { m_nLoction = loc; if (BRightChange) { if (m_uWillSetSkillID == 0) { TipsManager.Instance.ShowTips(LocalTextType.Skill_Commond_qingxuanzhongyigekeyitihuandejineng); return; } BRightChange = false; SendSetSkillMessage(); } if (BLeftChange) { rightItem.SetItemState(RightLearnSkillItemState.SetRightSelect); } } //string name = go.name; //int index = -1; //int len = name.Length - 1; //string indexStr = name[len].ToString(); //if ( int.TryParse( indexStr , out index ) ) //{ //} }