private void UpdateView()
 {
     TitlePanelPresenter.SetCoinsValue(PlayerDataModel.GetCoins());
     TitlePanelPresenter.SetGemsValue(PlayerDataModel.GetGems());
     TitlePanelPresenter.SetTicketsValue(PlayerDataModel.GetTickets());
     TitlePanelPresenter.SetXpValue(PlayerDataModel.GetXp());
     TitlePanelPresenter.SetLevelValue(PlayerDataModel.GetLevel());
 }
Пример #2
0
    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());
    }
Пример #3
0
 private int GetNextLevelXp()
 {
     return(Mathf.RoundToInt(PlayerDataModel.GetLevel() * 0.5f));
 }
Пример #4
0
 private void SetLevel(int Value)
 {
     PlayerDataModel.SetLevel(Value);
     TitlePanelPresenter.SetLevelValue(PlayerDataModel.GetLevel());
 }