Beispiel #1
0
 public void AddHeroData(HeroData data)
 {
     if (HerosContainer.ContainsKey(data.HeroId))
     {
         HerosContainer[data.HeroId] = data;
     }
     else
     {
         HerosContainer.Add(data.HeroId, data);
     }
 }
Beispiel #2
0
    protected void LockHeroData()
    {
        Hero[]     heros    = JsonMgr.GetSingleton().GetHeroArray(false);
        HeroData[] heroData = new HeroData[heros.Length];

        for (int i = 0; i < heros.Length; i++)
        {
            HeroData data = new HeroData(heros[i].ID);
            if (!HerosContainer.ContainsKey(data.HeroId))
            {
                HerosContainer.Add(data.HeroId, data);
            }
        }
    }