Beispiel #1
0
    public void Show(string name, string imageKey, HeroLevelExpData levelExpData)
    {
        _name.text        = name;
        _heroImage.sprite = Resources.Load <Sprite>(imageKey);
        _levelExpData     = levelExpData;
        _curLevel         = _levelExpData.OldLevel;
        _level.text       = _curLevel.ToString();
        _levelUpTip.SetActive(false);

        _expBar.Init();
        _UpdateExpBar();
    }
    private Dictionary <string, HeroLevelExpData> _AddExpToTeamHeroes(int exp)
    {
        Dictionary <string, HeroLevelExpData> levelExpDatas = new Dictionary <string, HeroLevelExpData>();
        var levelExpTable = _gameData.LevelExpTable;

        foreach (var hero in _playerData.Heroes.Values)
        {
            HeroLevelExpData levelExpData = _playerData.AddExp(hero.UID, exp, levelExpTable);
            levelExpDatas.Add(hero.UID, levelExpData);
        }
        return(levelExpDatas);
    }