Пример #1
0
        public void Awake()
        {
            Button             = GetComponent <Button>();
            Tooltip            = GetComponent <UITooltip>();
            SelectedBackground = transform.Find("Selected").gameObject;
            SelectedBackground.SetActive(false);
            Icon            = transform.Find("Icon").GetComponent <Image>();
            NameText        = transform.Find("Name").GetComponent <Text>();
            RewardLabel     = transform.Find("Rewards/RewardLabel").gameObject;
            InProgressLabel = transform.Find("Rewards/InProgressLabel").gameObject;
            CompleteLabel   = transform.Find("Rewards/CompleteLabel").gameObject;
            RewardTextIron  = transform.Find("Rewards/IronElement/Amount").GetComponent <Text>();
            RewardTextGold  = transform.Find("Rewards/GoldElement/Amount").GetComponent <Text>();

            var iconMaterial = StoreGui.instance.m_listElement.transform.Find("icon").GetComponent <Image>().material;

            if (iconMaterial != null)
            {
                Icon.material = iconMaterial;
            }
        }
Пример #2
0
        public void Awake()
        {
            Button             = GetComponent <Button>();
            Tooltip            = GetComponent <UITooltip>();
            SelectedBackground = transform.Find("Selected").gameObject;
            SelectedBackground.SetActive(false);
            Icon           = transform.Find("Icon").GetComponent <Image>();
            NameText       = transform.Find("Name").GetComponent <Text>();
            PriceContainer = transform.Find("Price").gameObject;
            PriceContainer.SetActive(true);
            PurchasedLabel = transform.Find("Purchased").gameObject;
            PurchasedLabel.SetActive(false);
            CoinsCostText = transform.Find("Price/PriceElementCoins/Amount").GetComponent <Text>();

            var iconMaterial = InventoryGui.instance.m_dragItemPrefab.transform.Find("icon").GetComponent <Image>().material;

            if (iconMaterial != null)
            {
                Icon.material = iconMaterial;
            }
        }
Пример #3
0
        public void Awake()
        {
            Button             = GetComponent <Button>();
            Tooltip            = GetComponent <UITooltip>();
            SelectedBackground = transform.Find("Selected").gameObject;
            SelectedBackground.SetActive(false);
            Icon                    = transform.Find("Icon").GetComponent <Image>();
            MagicBG                 = transform.Find("MagicBG").GetComponent <Image>();
            NameText                = transform.Find("Name").GetComponent <Text>();
            CoinsCostText           = transform.Find("Price/Coins/Amount").GetComponent <Text>();
            ForestTokenCostText     = transform.Find("Price/ForestTokens/Amount").GetComponent <Text>();
            IronBountyTokenCostText = transform.Find("Price/IronBountyToken/Amount").GetComponent <Text>();
            GoldBountyTokenCostText = transform.Find("Price/GoldBountyToken/Amount").GetComponent <Text>();

            var iconMaterial = StoreGui.instance.m_listElement.transform.Find("icon").GetComponent <Image>().material;

            if (iconMaterial != null)
            {
                Icon.material    = iconMaterial;
                MagicBG.material = iconMaterial;
            }
        }