private void Update() { int num = 0; foreach (WrapperCharacterShipment value in PersistentShipmentData.shipmentDictionary.Values) { TimeSpan timeSpan = GarrisonStatus.CurrentTime() - value.CreationTime; if ((value.ShipmentDuration - timeSpan).TotalSeconds > 0) { continue; } num++; } if (num != this.m_numReadyTroops) { if (num == 0 || num < this.m_numReadyTroops) { this.ClearEffects(); } if (num > this.m_numReadyTroops) { this.ClearEffects(); this.m_glowHandle = UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.transform, Vector3.zero, 3f, 0f); this.m_glowLoopHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", base.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 })); iTween.PunchRotation(this.m_numReadyTroopsTextBG, iTween.Hash(new object[] { "name", "RecruitNumSwing", "z", 50f, "time", 3f })); } this.m_numReadyTroops = num; this.m_numReadyTroopsText.text = string.Concat(string.Empty, (this.m_numReadyTroops <= 0 ? string.Empty : string.Concat(string.Empty, this.m_numReadyTroops))); this.m_numReadyTroopsTextBG.SetActive(this.m_numReadyTroops > 0); } }
private void HandleOrderHallfilterOptionsButtonSelected(OrderHallFilterOptionsButton navButton) { if (navButton != this) { this.m_labelArea.SetActive(false); this.m_normalImage.enabled = true; this.m_selectedImage.enabled = false; if (this.m_isSelected) { this.StopGlowEffect(); this.ResizeForDeselect(); this.m_isSelected = false; } } else if (!this.m_isSelected) { this.m_normalImage.enabled = false; this.m_selectedImage.enabled = true; this.StopGlowEffect(); this.m_glowSpinHandle = UiAnimMgr.instance.PlayAnim("PrestigeSpin", this.m_selectionGlowRoot.transform, Vector3.zero, 1.245f, 0f); this.m_glowPulseHandle = UiAnimMgr.instance.PlayAnim("PrestigePulse", this.m_selectionGlowRoot.transform, Vector3.zero, 1.245f, 0f); UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.transform, Vector3.zero, 1.5f, 0f); this.m_labelArea.SetActive(true); this.ResizeForSelect(); this.m_isSelected = true; } }
private void HandleCollectTroopResult(SHIPMENT_RESULT result, ulong shipmentDBID) { if (result == SHIPMENT_RESULT.SUCCESS && shipmentDBID == this.m_shipmentDBID) { if (this.m_glowLoopHandle != null) { UiAnimation anim = this.m_glowLoopHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } this.m_glowLoopHandle = null; } UiAnimMgr.instance.PlayAnim("GreenCheckRound", this.m_greenCheckEffectRoot, Vector3.zero, 1.8f, 0f); Main.instance.m_UISound.Play_GreenCheck(); this.m_training = false; this.m_troopOwnedCheckmark.gameObject.SetActive(true); this.m_troopPortraitImage.gameObject.SetActive(true); this.m_timeRemainingText.gameObject.SetActive(false); this.m_troopPortraitImage.material = null; PersistentShipmentData.shipmentDictionary.Remove(shipmentDBID); LegionCompanionWrapper.RequestShipmentTypes((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestShipments((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); } }
private void Update() { if (this.timeRemainingUntilLootEffect <= 0f) { return; } this.timeRemainingUntilLootEffect -= Time.deltaTime; if (this.timeRemainingUntilLootEffect <= 0f) { if (this.m_enableLootEffect_success) { this.m_greenCheck.gameObject.SetActive(true); if (this.m_glowEffectRootTransform != null) { this.m_glowEffectHandle = UiAnimMgr.instance.PlayAnim("GarrisonMissionRewardsEffectTemplate", this.m_glowEffectRootTransform, Vector3.zero, 1f, 0f); } this.m_effectHandle = UiAnimMgr.instance.PlayAnim(this.m_uiAnimation_success, this.m_greenCheckEffectRootTransform, Vector3.zero, this.m_animScale_success, 0f); Main.instance.m_UISound.Play_GreenCheck(); } if (this.m_enableLootEffect_fail) { this.m_redX.gameObject.SetActive(true); this.m_effectHandle = UiAnimMgr.instance.PlayAnim(this.m_uiAnimation_fail, this.m_redFailXEffectRootTransform, Vector3.zero, this.m_animScale_fail, 0f); Main.instance.m_UISound.Play_RedFailX(); } } }
public void StopAKReadyToUseAnim() { if (this.m_akReadyToConsumeEffectHandle != null) { UiAnimation anim = this.m_akReadyToConsumeEffectHandle.GetAnim(); if (anim != null) { anim.Stop(0f); } this.m_akReadyToConsumeEffectHandle = null; } }
private void StopGlowEffect() { if (this.m_glowSpinHandle != null) { UiAnimation anim = this.m_glowSpinHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } this.m_glowSpinHandle = null; } if (this.m_glowPulseHandle != null) { UiAnimation uiAnimation = this.m_glowPulseHandle.GetAnim(); if (uiAnimation != null) { uiAnimation.Stop(0.5f); } this.m_glowPulseHandle = null; } }
private void StopGlowEffect() { if (this.m_glowSpinHandle != null) { UiAnimation anim = this.m_glowSpinHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } this.m_glowSpinHandle = null; } if (this.m_glowPulseHandle != null) { UiAnimation uiAnimation = this.m_glowPulseHandle.GetAnim(); if (uiAnimation != null) { uiAnimation.Stop(0.5f); } this.m_glowPulseHandle = null; } this.m_greenSelectionGlow.gameObject.SetActive(false); }
public void HandleMissionChanged(int newMissionID) { if (this.m_isStackablePreview || this.m_garrMissionID == 0) { return; } if (this.m_selectedEffectAnimHandle != null) { UiAnimation anim = this.m_selectedEffectAnimHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } } if (newMissionID == this.m_garrMissionID) { this.m_selectedEffectAnimHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", this.m_selectedEffectRoot, Vector3.zero, 2.5f, 0f); } if (this.m_selectionRing != null) { this.m_selectionRing.gameObject.SetActive(newMissionID == this.m_garrMissionID); } }
private void Update() { if (this.m_training) { TimeSpan timeSpan = GarrisonStatus.CurrentTime() - this.m_shipmentCreationTime; Mathf.Clamp((float)timeSpan.TotalSeconds / (float)this.m_shipmentDuration.TotalSeconds, 0f, 1f); TimeSpan mShipmentDuration = this.m_shipmentDuration - timeSpan; if (mShipmentDuration.TotalSeconds < 0) { mShipmentDuration = TimeSpan.Zero; } if (mShipmentDuration.TotalSeconds > 0) { this.m_timeRemainingText.text = mShipmentDuration.GetDurationString(true); } else if (this.m_glowLoopHandle == null) { this.m_glowLoopHandle = UiAnimMgr.instance.PlayAnim("MinimapLoopPulseAnim", base.transform, Vector3.zero, 2f, 0f); this.m_timeRemainingText.text = StaticDB.GetString("COLLECT", null); Main.instance.m_UISound.Play_TroopsReadyToast(); } } }
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))); } }
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); } this.m_notificationBadgeText.text = string.Concat(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); } this.m_notificationBadgeText.text = string.Concat(string.Empty, numReadyShipments); } break; } case OrderHallNavButton.NavButtonType.map: case OrderHallNavButton.NavButtonType.followers: { break; } case OrderHallNavButton.NavButtonType.talents: { bool playGreenCheckAnim = this.m_gamePanel.m_talentTreePanel.TalentIsReadyToPlayGreenCheckAnim(); if (!playGreenCheckAnim && this.m_notificationBadgeRoot.activeSelf) { this.m_notificationBadgeRoot.SetActive(false); } else if (playGreenCheckAnim && !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); } } break; } default: { goto case OrderHallNavButton.NavButtonType.followers; } } }
public void PlayAKReadyToUseAnim() { this.m_akReadyToConsumeEffectHandle = UiAnimMgr.instance.PlayAnim("ItemReadyToUseGlowLoop", base.transform, Vector3.zero, 1.2f, 0f); }
public void SetCharShipment(int charShipmentID, ulong shipmentDBID, int ownedGarrFollowerID, bool training, int iconFileDataID = 0) { CharShipmentRec record = StaticDB.charShipmentDB.GetRecord(charShipmentID); if (record == null) { Debug.LogError(string.Concat("Invalid Shipment ID: ", charShipmentID)); return; } if (this.m_glowLoopHandle != null) { UiAnimation anim = this.m_glowLoopHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } this.m_glowLoopHandle = null; } this.m_collected = false; this.m_pendingCreate = false; this.m_collectingSpinner.SetActive(false); this.m_ownedGarrFollowerID = ownedGarrFollowerID; this.m_training = training; this.m_shipmentDBID = shipmentDBID; if (training) { if (PersistentShipmentData.shipmentDictionary.ContainsKey(shipmentDBID)) { WrapperCharacterShipment item = PersistentShipmentData.shipmentDictionary[shipmentDBID]; this.m_shipmentCreationTime = item.CreationTime; this.m_shipmentDuration = item.ShipmentDuration; } else { training = false; Debug.LogWarning(string.Concat("Shipment not found in Persistent: ", charShipmentID)); } } if (record.GarrFollowerID > 0) { this.SetCharShipmentTroop(record, iconFileDataID); } else if (record.DummyItemID > 0) { this.SetCharShipmentItem(record); } if (ownedGarrFollowerID != 0) { this.m_troopBuildEmptyRing.gameObject.SetActive(false); this.m_troopOwnedCheckmark.gameObject.SetActive(true); this.m_troopPortraitImage.gameObject.SetActive(true); this.m_timeRemainingText.gameObject.SetActive(false); return; } if (!training) { this.m_troopBuildEmptyRing.gameObject.SetActive(false); this.m_troopOwnedCheckmark.gameObject.SetActive(false); this.m_troopPortraitImage.gameObject.SetActive(false); this.m_timeRemainingText.gameObject.SetActive(false); } else { this.m_troopBuildEmptyRing.gameObject.SetActive(true); this.m_troopOwnedCheckmark.gameObject.SetActive(false); this.m_troopPortraitImage.gameObject.SetActive(true); this.m_timeRemainingText.gameObject.SetActive(true); this.m_timeRemainingText.text = string.Empty; if (this.m_grayscaleShader != null) { Material material = new Material(this.m_grayscaleShader); this.m_troopPortraitImage.material = material; } } }