Example #1
0
 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 ClearEffects()
 {
     iTween.StopByName(this.m_theActualButton, "RecruitWobble");
     iTween.StopByName(this.m_theActualButton, "RecruitWobbleL");
     iTween.StopByName(this.m_theActualButton, "RecruitButtonSwing");
     this.m_theActualButton.transform.localScale    = Vector3.one;
     this.m_theActualButton.transform.localRotation = Quaternion.identity;
     iTween.StopByName(this.m_numReadyTroopsTextBG, "RecruitNumSwing");
     this.m_numReadyTroopsTextBG.transform.localRotation = Quaternion.identity;
     if (this.m_glowHandle != null)
     {
         UiAnimation anim = this.m_glowHandle.GetAnim();
         if (anim != null)
         {
             anim.Stop(0.5f);
         }
     }
     if (this.m_glowLoopHandle != null)
     {
         UiAnimation anim2 = this.m_glowLoopHandle.GetAnim();
         if (anim2 != null)
         {
             anim2.Stop(0.5f);
         }
     }
 }
 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 anim2 = this.m_glowPulseHandle.GetAnim();
         if (anim2 != null)
         {
             anim2.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);
     }
 }
 public void ClearResults()
 {
     this.m_enableLootEffect_success = false;
     this.m_enableLootEffect_fail    = false;
     if (this.m_greenCheck != null)
     {
         this.m_greenCheck.gameObject.SetActive(false);
     }
     if (this.m_redX != null)
     {
         this.m_redX.gameObject.SetActive(false);
     }
     if (this.m_effectHandle != null)
     {
         UiAnimation anim = this.m_effectHandle.GetAnim();
         if (anim != null)
         {
             anim.Stop(0f);
         }
     }
     if (this.m_glowEffectHandle != null)
     {
         UiAnimation anim2 = this.m_glowEffectHandle.GetAnim();
         if (anim2 != null)
         {
             anim2.Stop(0f);
         }
     }
     if (this.m_akReadyToConsumeEffectHandle != null)
     {
         UiAnimation anim3 = this.m_akReadyToConsumeEffectHandle.GetAnim();
         if (anim3 != null)
         {
             anim3.Stop(0f);
         }
     }
 }
Example #8
0
        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("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))
                {
                    training = false;
                    Debug.LogWarning("Shipment not found in Persistent: " + charShipmentID);
                }
                else
                {
                    WrapperCharacterShipment wrapperCharacterShipment = PersistentShipmentData.shipmentDictionary[shipmentDBID];
                    this.m_shipmentCreationTime = wrapperCharacterShipment.CreationTime;
                    this.m_shipmentDuration     = wrapperCharacterShipment.ShipmentDuration;
                }
            }
            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(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;
                }
            }
            else
            {
                this.m_troopBuildEmptyRing.gameObject.SetActive(false);
                this.m_troopOwnedCheckmark.gameObject.SetActive(false);
                this.m_troopPortraitImage.gameObject.SetActive(false);
                this.m_timeRemainingText.gameObject.SetActive(false);
            }
        }