Beispiel #1
0
    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);
    }
Beispiel #2
0
 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;
 }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 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);
 }