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());
 }