private void UpdateView() { TitlePanelPresenter.SetCoinsValue(PlayerDataModel.GetCoins()); TitlePanelPresenter.SetGemsValue(PlayerDataModel.GetGems()); TitlePanelPresenter.SetTicketsValue(PlayerDataModel.GetTickets()); TitlePanelPresenter.SetXpValue(PlayerDataModel.GetXp()); TitlePanelPresenter.SetLevelValue(PlayerDataModel.GetLevel()); }
public void AddXp(int Value) { if (PlayerDataModel.GetXp() + Value > GetNextLevelXp()) { PlayerDataModel.SetXp(PlayerDataModel.GetXp() + Value - GetNextLevelXp()); SetLevel(PlayerDataModel.GetLevel()); } else { PlayerDataModel.SetXp(Value); } TitlePanelPresenter.SetXpValue(PlayerDataModel.GetXp()); }