Esempio n. 1
0
 public override bool HasUpdateNews()
 {
     for (int i = 0, max = RewardManager.GetInstance().rewardCount; i < max; i++)
     {
         RewardBase reward = RewardManager.GetInstance().GetNowReward((Define.RewardType)i);
         if (!reward.IsMaxLevel() && reward.IsCompleted())
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
    public override void UpdateUI()
    {
        RewardBase reward = RewardManager.GetInstance().GetNowReward((Define.RewardType)idx);

        infoLabel.text = reward.GetInfoText();

        coinLabel.text = reward.GetRewardCoin().ToString();
        Vector3 pos = coinLabelBody.localPosition;

        pos.x = 34f - coinLabel.width;
        coinLabelBody.localPosition = pos;
        pos.x -= 4f;
        coinIcon.localPosition = pos;

        if (reward.IsMaxLevel())
        {
            rewardInfoBody.SetActive(false);
            rewardButton.SetActive(false);
            stateBody.SetActive(false);
            allClearBody.SetActive(true);
            allClearLabel.text = DataManager.GetText(TextTable.allClearKey);
        }
        else if (reward.IsCompleted())
        {
            rewardInfoBody.SetActive(true);
            rewardButton.SetActive(true);
            stateBody.SetActive(false);
            allClearBody.SetActive(false);
            stateLabel.text = "";
        }
        else
        {
            rewardInfoBody.SetActive(true);
            rewardButton.SetActive(false);
            stateBody.SetActive(true);
            allClearBody.SetActive(false);
            stateLabel.text = RewardManager.GetInstance().GetRewardStateText(reward);
        }
    }