private void Show_ZhouMoZhe_Reward()
        {
            CFriendRecruit friendRecruit = Singleton <CFriendContoller> .instance.model.friendRecruit;

            if (this.zm_benifit_exp != null)
            {
                this.zm_benifit_exp.set_text(string.Format("+{0}%", friendRecruit.GetZhaoMuZhe_RewardExp()));
            }
            if (this.zm_benifit_gold != null)
            {
                this.zm_benifit_gold.set_text(string.Format("+{0}%", friendRecruit.GetZhaoMuZhe_RewardGold()));
            }
            int    zhaoMuZhe_RewardProgress   = friendRecruit.GetZhaoMuZhe_RewardProgress();
            int    zhaoMuZhe_RewardTotalCount = friendRecruit.GetZhaoMuZhe_RewardTotalCount();
            string text = Singleton <CTextManager> .instance.GetText("Friend_Rec_zmz_whole_Progress", new string[]
            {
                zhaoMuZhe_RewardProgress.ToString(),
                zhaoMuZhe_RewardTotalCount.ToString()
            });

            if (this.zm_totalProgress != null)
            {
                this.zm_totalProgress.set_text(text);
            }
            string text2 = Singleton <CTextManager> .instance.GetText("Friend_Rec_zm_ProgressText", new string[]
            {
                zhaoMuZhe_RewardProgress.ToString(),
                zhaoMuZhe_RewardTotalCount.ToString()
            });

            if (this.zm_ProgressText != null)
            {
                this.zm_ProgressText.set_text(text2);
            }
            for (int i = 0; i < zhaoMuZhe_RewardProgress; i++)
            {
                GameObject gameObject = Utility.FindChild(this.zm_progressNode, string.Format("reward{0}", i));
                this.ShowCup(gameObject, true, i);
            }
            for (int j = zhaoMuZhe_RewardProgress; j < zhaoMuZhe_RewardTotalCount; j++)
            {
                GameObject gameObject2 = Utility.FindChild(this.zm_progressNode, string.Format("reward{0}", j));
                this.ShowCup(gameObject2, false, j);
            }
            ResRecruitmentReward cfgReward = Singleton <CFriendContoller> .instance.model.friendRecruit.GetCfgReward(friendRecruit.SuperReward.rewardID);

            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            this.Show_Award(this.supberRewardNode, 0uL, 0u, COM_RECRUITMENT_TYPE.COM_RECRUITMENT_ACTIVE, friendRecruit.SuperReward.rewardID, cfgReward, friendRecruit.SuperReward.state, form, false);
            this.Refresh_ZhaomuZhe_List();
            this.zhaomu_content.CustomSetActive(true);
            this.beizhaomu_content.CustomSetActive(false);
        }
Esempio n. 2
0
        private void Show_ZhouMoZhe_Reward()
        {
            CFriendRecruit friendRecruit = Singleton <CFriendContoller> .get_instance().model.friendRecruit;

            if (this.zm_benifit_exp != null)
            {
                this.zm_benifit_exp.text = string.Format("+{0}%", friendRecruit.GetZhaoMuZhe_RewardExp());
            }
            if (this.zm_benifit_gold != null)
            {
                this.zm_benifit_gold.text = string.Format("+{0}%", friendRecruit.GetZhaoMuZhe_RewardGold());
            }
            int    zhaoMuZhe_RewardProgress   = friendRecruit.GetZhaoMuZhe_RewardProgress();
            int    zhaoMuZhe_RewardTotalCount = friendRecruit.GetZhaoMuZhe_RewardTotalCount();
            string text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_zmz_whole_Progress", new string[]
            {
                zhaoMuZhe_RewardProgress.ToString(),
                zhaoMuZhe_RewardTotalCount.ToString()
            });

            if (this.zm_totalProgress != null)
            {
                this.zm_totalProgress.text = text;
            }
            for (int i = 0; i < zhaoMuZhe_RewardProgress; i++)
            {
                GameObject gameObject = this.zm_progressNode.transform.FindChild(string.Format("icon_{0}", i)).gameObject;
                this.ShowBar(gameObject, true);
            }
            for (int j = zhaoMuZhe_RewardProgress; j < zhaoMuZhe_RewardTotalCount; j++)
            {
                GameObject gameObject2 = this.zm_progressNode.transform.FindChild(string.Format("icon_{0}", j)).gameObject;
                this.ShowBar(gameObject2, false);
            }
            if (this.supberRewardNodeTxt != null)
            {
                this.supberRewardNodeTxt.text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_zmz_Progress", new string[]
                {
                    FriendRecruitView.zmzCount.ToString(),
                    FriendRecruitView.zmzLevel.ToString()
                });
            }
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            this.Show_Award(this.supberRewardNode, 0uL, 0u, 1, friendRecruit.SuperReward.rewardID, friendRecruit.SuperReward.state, form, false);
            this.Refresh_ZhaomuZhe_List();
            this.zhaomu_content.CustomSetActive(true);
            this.beizhaomu_content.CustomSetActive(false);
        }