public string GetParentNameByLocation(int location) { string name = ""; if (ShowState == SkillSettingState.StateOne) { var iter = OneLocationDic.GetEnumerator(); while (iter.MoveNext()) { var loc = iter.Current; if (loc.Value == location) { name = loc.Key; return(name); } } } if (ShowState == SkillSettingState.StateTwo) { var iter = TwoLocationDic.GetEnumerator(); while (iter.MoveNext()) { var loc = iter.Current; if (loc.Value == location) { name = loc.Key; return(name); } } } return(name); }
public void Reset(bool depthClearData = false) { allBaseSkillDataBase.Clear(); unLockSkillList.Clear(); lockSkillList.Clear(); stateOneDic.Clear(); stateTwoDic.Clear(); stateOneLocationDic.Clear(); stateTwoLocationDic.Clear(); OneLocationDic.Clear(); TwoLocationDic.Clear(); userSkilldic.Clear(); ShowState = SkillSettingState.None; CurState = SkillSettingState.None; IsSettingPanel = false; }
public void ClearData() { allBaseSkillDataBase.Clear(); unLockSkillList.Clear(); lockSkillList.Clear(); stateOneDic.Clear(); stateTwoDic.Clear(); stateOneLocationDic.Clear(); stateTwoLocationDic.Clear(); OneLocationDic.Clear(); TwoLocationDic.Clear(); userSkilldic.Clear(); ShowState = SkillSettingState.StateOne; CurState = SkillSettingState.StateOne; IsSettingPanel = false; RegisterEvent(false); }
public int GetLocation(string name) { if (ShowState == SkillSettingState.StateOne) { if (OneLocationDic.ContainsKey(name)) { return(OneLocationDic[name]); } } else if (ShowState == SkillSettingState.StateTwo) { if (TwoLocationDic.ContainsKey(name)) { return(TwoLocationDic[name]); } } Log.Error("get location error "); return(-1); }