Esempio n. 1
0
 private void OnEnable()
 {
     this.GetRequestedMissionCollectionDictionary().Clear();
     this.okButton.SetActive(false);
     this.mainCanvas.renderMode = 1;
     if (GarrisonStatus.Faction() == PVP_FACTION.HORDE)
     {
         this.hordeCommander.SetActive(true);
         this.allianceCommander.SetActive(false);
     }
     else
     {
         this.hordeCommander.SetActive(false);
         this.allianceCommander.SetActive(true);
     }
     this.completedMissionsText.text = string.Empty + PersistentMissionData.GetNumCompletedMissions(false) + " Completed Missions";
     MissionListItem[] componentsInChildren = this.completedMissionListContents.GetComponentsInChildren <MissionListItem>(true);
     for (int i = 0; i < componentsInChildren.Length; i++)
     {
         Object.Destroy(componentsInChildren[i].gameObject);
     }
     MissionRewardDisplay[] componentsInChildren2 = this.missionRewardsIconArea.GetComponentsInChildren <MissionRewardDisplay>(true);
     for (int j = 0; j < componentsInChildren2.Length; j++)
     {
         Object.Destroy(componentsInChildren2[j].gameObject);
     }
     this.missionReportView.SetActive(true);
     this.missionResultsView.SetActive(false);
 }
 private void UpdateCompletedMissionsDisplay()
 {
     if (PersistentMissionData.GetNumCompletedMissions(false) > 0)
     {
         this.m_nextCompletedMissionButton.gameObject.SetActive(true);
     }
 }
Esempio n. 3
0
 private void OnEnable()
 {
     this.GetRequestedMissionCollectionDictionary().Clear();
     this.okButton.SetActive(false);
     this.mainCanvas.renderMode = RenderMode.ScreenSpaceCamera;
     if (GarrisonStatus.Faction() != PVP_FACTION.HORDE)
     {
         this.hordeCommander.SetActive(false);
         this.allianceCommander.SetActive(true);
     }
     else
     {
         this.hordeCommander.SetActive(true);
         this.allianceCommander.SetActive(false);
     }
     this.completedMissionsText.text = string.Concat(string.Empty, PersistentMissionData.GetNumCompletedMissions(false), " Completed Missions");
     MissionListItem[] componentsInChildren = this.completedMissionListContents.GetComponentsInChildren <MissionListItem>(true);
     for (int i = 0; i < (int)componentsInChildren.Length; i++)
     {
         UnityEngine.Object.Destroy(componentsInChildren[i].gameObject);
     }
     MissionRewardDisplay[] missionRewardDisplayArray = this.missionRewardsIconArea.GetComponentsInChildren <MissionRewardDisplay>(true);
     for (int j = 0; j < (int)missionRewardDisplayArray.Length; j++)
     {
         UnityEngine.Object.Destroy(missionRewardDisplayArray[j].gameObject);
     }
     this.missionReportView.SetActive(true);
     this.missionResultsView.SetActive(false);
 }
		private void Update()
		{
			int numCompletedMissions = PersistentMissionData.GetNumCompletedMissions(true);
			if (numCompletedMissions != this.m_numReadyTroops)
			{
				this.m_theActualButton.SetActive(numCompletedMissions > 0);
				if (numCompletedMissions == 0)
				{
					this.ClearEffects();
				}
				if (numCompletedMissions > this.m_numReadyTroops)
				{
					this.ClearEffects();
					this.m_glowHandle = UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", this.m_theActualButton.transform, Vector3.zero, 3f, 0f);
					this.m_glowLoopHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", this.m_theActualButton.transform, Vector3.zero, 3f, 0f);
					iTween.PunchScale(this.m_theActualButton, iTween.Hash(new object[] { "name", "RecruitWobble", "x", this.amount, "y", this.amount, "time", this.duration, "delay", 0.1f, "looptype", iTween.LoopType.none }));
					iTween.PunchScale(this.m_theActualButton, iTween.Hash(new object[] { "name", "RecruitWobbleL", "x", this.amount, "y", this.amount, "time", this.duration, "delay", this.delay, "looptype", iTween.LoopType.loop }));
					iTween.PunchRotation(this.m_theActualButton, iTween.Hash(new object[] { "name", "RecruitButtonSwing", "z", -30f, "time", 2f }));
					Main.instance.m_UISound.Play_LootReady();
				}
				this.m_numReadyTroops = numCompletedMissions;
				this.m_numReadyTroopsText.text = string.Concat(string.Empty, (this.m_numReadyTroops <= 0 ? string.Empty : string.Concat(string.Empty, this.m_numReadyTroops)));
			}
		}
Esempio n. 5
0
 private void Update()
 {
     this.completedMissionsText.text = string.Empty + PersistentMissionData.GetNumCompletedMissions(false) + " Completed Missions";
 }
        private void Update()
        {
            switch (this.m_navButtonType)
            {
            case OrderHallNavButton.NavButtonType.missions:
            {
                int numCompletedMissions = PersistentMissionData.GetNumCompletedMissions(true);
                if (numCompletedMissions == 0 && this.m_notificationBadgeRoot.activeSelf)
                {
                    this.m_notificationBadgeRoot.SetActive(false);
                }
                else if (numCompletedMissions > 0)
                {
                    if (!this.m_notificationBadgeRoot.activeSelf)
                    {
                        this.m_notificationBadgeRoot.SetActive(true);
                    }
                    if (this.m_notificationPulseHandle == null)
                    {
                        this.m_notificationPulseHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", this.m_notificationBadgeRoot.transform, Vector3.zero, 1f, 0f);
                    }
                    else
                    {
                        this.RealignNotificationPulse();
                    }
                    this.m_notificationBadgeText.text = string.Empty + numCompletedMissions;
                }
                break;
            }

            case OrderHallNavButton.NavButtonType.recruit:
            {
                int numReadyShipments = PersistentShipmentData.GetNumReadyShipments();
                if (numReadyShipments == 0 && this.m_notificationBadgeRoot.activeSelf)
                {
                    this.m_notificationBadgeRoot.SetActive(false);
                }
                else if (numReadyShipments > 0)
                {
                    if (!this.m_notificationBadgeRoot.activeSelf)
                    {
                        this.m_notificationBadgeRoot.SetActive(true);
                    }
                    if (this.m_notificationPulseHandle == null)
                    {
                        this.m_notificationPulseHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", this.m_notificationBadgeRoot.transform, Vector3.zero, 1f, 0f);
                    }
                    else
                    {
                        this.RealignNotificationPulse();
                    }
                    this.m_notificationBadgeText.text = string.Empty + numReadyShipments;
                }
                break;
            }

            case OrderHallNavButton.NavButtonType.talents:
            {
                bool flag = this.m_gamePanel.m_talentTreePanel.TalentIsReadyToPlayGreenCheckAnim();
                if (!flag && this.m_notificationBadgeRoot.activeSelf)
                {
                    this.m_notificationBadgeRoot.SetActive(false);
                }
                else if (flag && !this.m_notificationBadgeRoot.activeSelf)
                {
                    this.m_notificationBadgeRoot.SetActive(true);
                    this.m_notificationBadgeText.text = "1";
                    if (this.m_notificationPulseHandle == null)
                    {
                        this.m_notificationPulseHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", this.m_notificationBadgeRoot.transform, Vector3.zero, 1f, 0f);
                    }
                    else
                    {
                        this.RealignNotificationPulse();
                    }
                }
                break;
            }
            }
        }
Esempio n. 7
0
 private void Update()
 {
     this.completedMissionsText.text = string.Concat(string.Empty, PersistentMissionData.GetNumCompletedMissions(false), " Completed Missions");
 }