Exemple #1
0
    public void OnClaimPrizeDailyRewards(int day)
    {
        Reward myReward = m_DailyRewardManager.GetReward(day);

        m_CurrentCoins      += myReward.reward;
        m_StatsManager.Coins = m_CurrentCoins;
        m_MainMenuView.RefreshTotalCoinsText(m_CurrentCoins);
    }
Exemple #2
0
    // Initializes the UI List based on the rewards size
    private void InitializeDailyRewardsUI()
    {
        for (int i = 0; i < m_DailyRewardManager.rewards.Count; i++)
        {
            int day    = i + 1;
            var reward = m_DailyRewardManager.GetReward(day);

            DailyRewardUI dailyRewardUI = Instantiate(m_DailyRewardPrefab).GetComponent <DailyRewardUI>();
            dailyRewardUI.transform.SetParent(m_DailyRewardsGroup);
            dailyRewardUI.transform.localScale = Vector2.one;
            dailyRewardUI.transform.SetAsFirstSibling();
            dailyRewardUI.m_Day    = day;
            dailyRewardUI.m_Reward = reward;
            dailyRewardUI.Initialize();

            m_DailyRewardsUI.Add(dailyRewardUI);
        }
    }