Esempio n. 1
0
    // 更新客户端本地数据
    private void UpdateClientData()
    {
        UserManager.Instance.OnAddUserExp(PVEManager.Instance.BattleResult.addPlayerExp);
        UserManager.Instance.AddMoney(PVEManager.Instance.BattleResult.addMoney, PriceType.MONEY);

        foreach (var item in PVEManager.Instance.BattleResult.heroInfo)
        {
            HeroInfo heroInfo = UserManager.Instance.GetHeroInfo(item.heroID);
            if (heroInfo != null)
            {
                heroInfo.OnAddExp(item.addExp);
            }
        }

        UserManager.Instance.AddItem(PVEManager.Instance.BattleResult.itemInfo, true);
    }