Esempio n. 1
0
        public void HandleShipmentItemPushed(WrapperShipmentItem item)
        {
            if (!this.m_itemResourceCostText.gameObject.activeSelf)
            {
                return;
            }
            if (!this.m_lootDisplayArea.activeSelf)
            {
                this.m_lootDisplayArea.SetActive(true);
            }
            int charShipmentTypeID = this.GetCharShipmentTypeID();
            MissionRewardDisplay missionRewardDisplay;

            if (charShipmentTypeID >= 372 && charShipmentTypeID <= 383)
            {
                missionRewardDisplay = Object.Instantiate <MissionRewardDisplay>(this.m_rewardDisplayPrefab);
                missionRewardDisplay.transform.SetParent(this.m_lootItemArea.transform, false);
                missionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.currency, item.ItemID, item.Count, 0, 0);
            }
            else
            {
                missionRewardDisplay = Object.Instantiate <MissionRewardDisplay>(this.m_rewardDisplayPrefab);
                missionRewardDisplay.transform.SetParent(this.m_lootItemArea.transform, false);
                missionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.item, item.ItemID, item.Count, item.Context, item.IconFileDataID);
            }
            if (missionRewardDisplay != null)
            {
                UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", missionRewardDisplay.transform, Vector3.zero, 1.5f, 0f);
            }
        }
Esempio n. 2
0
 private void HandleShipmentItemPushed(int charShipmentID, WrapperShipmentItem item)
 {
     TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
     foreach (TroopsListItem troopsListItem in componentsInChildren)
     {
         if (troopsListItem.GetCharShipmentTypeID() == charShipmentID)
         {
             troopsListItem.HandleShipmentItemPushed(item);
         }
     }
 }
 private void HandleShipmentItemPushed(int charShipmentID, WrapperShipmentItem item)
 {
     TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
     for (int i = 0; i < (int)componentsInChildren.Length; i++)
     {
         TroopsListItem troopsListItem = componentsInChildren[i];
         if (troopsListItem.GetCharShipmentTypeID() == charShipmentID)
         {
             troopsListItem.HandleShipmentItemPushed(item);
         }
     }
 }