コード例 #1
0
 public void UpdateParam(TowerFloorParam param, int floorNo)
 {
     if (param == null)
     {
         this.SetVisible(TowerQuestListItem.Type.Unknown);
     }
     else
     {
         QuestParam questParam = param.Clone((QuestParam)null, true);
         bool       flag       = questParam.IsQuestCondition();
         if (flag && questParam.state != QuestStates.Cleared)
         {
             this.SetVisible(TowerQuestListItem.Type.Current);
         }
         else if (questParam.state == QuestStates.Cleared)
         {
             this.SetVisible(TowerQuestListItem.Type.Cleared);
         }
         else if (!flag)
         {
             this.SetVisible(TowerQuestListItem.Type.Locked);
         }
         if (param != null && Object.op_Inequality((Object)this.mText, (Object)null))
         {
             this.mText.set_text(param.title + " " + param.name);
         }
         if (!Object.op_Inequality((Object)this.m_FloorText, (Object)null))
         {
             return;
         }
         this.m_FloorText.set_text(param.GetFloorNo().ToString() + "!");
     }
 }
コード例 #2
0
ファイル: TowerManager.cs プロジェクト: zunaalabaya/TAC-BOT
        private void RefreshUI()
        {
            QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID);

            this.mRecoverTime = MonoSingleton <GameManager> .Instance.TowerResuponse.rtime;
            if (quest != null && Object.op_Inequality((Object)this.ChallengeButton, (Object)null))
            {
                DataSource.Bind <QuestParam>(((Component)this.ChallengeButton).get_gameObject(), quest);
                ((Selectable)this.ChallengeButton).set_interactable(quest.IsQuestCondition() && quest.state != QuestStates.Cleared);
                GameParameter.UpdateAll(((Component)this.ChallengeButton).get_gameObject());
            }
            if (Object.op_Inequality((Object)this.RecoverButton, (Object)null))
            {
                TowerResuponse towerResuponse = MonoSingleton <GameManager> .Instance.TowerResuponse;
                bool           flag           = towerResuponse.GetAvailableUnits().Count > 0 && towerResuponse.ExistDamagedUnit() || towerResuponse.GetDiedUnitNum() > 0;
                ((Selectable)this.RecoverButton).set_interactable(flag && !towerResuponse.is_reset);
                if (Object.op_Inequality((Object)this.RecoverTimer, (Object)null))
                {
                    this.RecoverTimer.SetActive(flag);
                }
            }
            if (Object.op_Inequality((Object)this.ResetButton, (Object)null))
            {
                TowerResuponse towerResuponse = MonoSingleton <GameManager> .Instance.TowerResuponse;
                ((Component)this.ResetButton).get_gameObject().SetActive(towerResuponse.is_reset);
                ((Component)this.ChallengeButton).get_gameObject().SetActive(!towerResuponse.is_reset);
                this.ResetText.set_text(towerResuponse.reset_cost.ToString());
                bool flag = (int)towerResuponse.reset_cost == 0;
                ((Component)this.ResetText).get_gameObject().SetActive(!flag);
                ((Component)this.ResetTextFree).get_gameObject().SetActive(flag);
            }
            this.SetAliveUnitsText();
            this.SetRecoverText();
        }
コード例 #3
0
        private bool RefreshRankingQuests()
        {
            List <RankingQuestParam> rankingQuesstParams = MonoSingleton <GameManager> .Instance.AvailableRankingQuesstParams;
            List <QuestParam>        questParamList      = new List <QuestParam>();

            for (int index = 0; index < rankingQuesstParams.Count; ++index)
            {
                QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(rankingQuesstParams[index].iname);

                if (quest != null && questParamList.Find((Predicate <QuestParam>)(q => q.iname == quest.iname)) == null)
                {
                    questParamList.Add(quest);
                }
            }
            this.mQuests.Clear();
            for (int index = 0; index < questParamList.Count; ++index)
            {
                QuestParam questParam = questParamList[index];
                if (!questParamList[index].IsMulti && questParam.type != QuestTypes.Gps && (questParam.IsDateUnlock(-1L) && questParam.IsQuestCondition()))
                {
                    this.mQuests.Add(questParam);
                }
            }
            this.RefreshChapterTimer();
            return(this.mQuests.Count > 0);
        }
コード例 #4
0
ファイル: QuestListV2.cs プロジェクト: zunaalabaya/TAC-BOT
        private bool RefreshRankingQuests()
        {
            List <RankingQuestParam> rankingQuesstParams = MonoSingleton <GameManager> .Instance.AvailableRankingQuesstParams;
            List <QuestParam>        questParamList      = new List <QuestParam>();

            for (int index = 0; index < rankingQuesstParams.Count; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                QuestListV2.\u003CRefreshRankingQuests\u003Ec__AnonStorey36C questsCAnonStorey36C = new QuestListV2.\u003CRefreshRankingQuests\u003Ec__AnonStorey36C();
                // ISSUE: reference to a compiler-generated field
                questsCAnonStorey36C.quest = MonoSingleton <GameManager> .Instance.FindQuest(rankingQuesstParams[index].iname);

                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated method
                if (questsCAnonStorey36C.quest != null && questParamList.Find(new Predicate <QuestParam>(questsCAnonStorey36C.\u003C\u003Em__3EF)) == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    questParamList.Add(questsCAnonStorey36C.quest);
                }
            }
            this.mQuests.Clear();
            for (int index = 0; index < questParamList.Count; ++index)
            {
                QuestParam questParam = questParamList[index];
                if (!questParamList[index].IsMulti && questParam.type != QuestTypes.Gps && (questParam.IsDateUnlock(-1L) && questParam.IsQuestCondition()))
                {
                    this.mQuests.Add(questParam);
                }
            }
            this.RefreshChapterTimer();
            return(this.mQuests.Count > 0);
        }