示例#1
0
    void AddUsedHeroes()
    {
        if (m_OwnedHeroes == null)
        {
            return;
        }


        Dictionary <int, HeroInfoBase> dict = HeroInfoBase.data;

        foreach (HeroData hero in m_OwnedHeroes.Where(hero => hero.CreatedFromRecipe))
        {
            dict[hero.HashCode] = Resources.FindObjectsOfTypeAll <HeroInfoBase>().Where(heroBase => heroBase.heroName == hero.HeroName).First();
        }

        HeroFactory.ResetAvailableHeroes();
    }