Ejemplo n.º 1
0
        public void DisplayIncome(float income, CurrencyType currencyType)
        {
            m_canvasGroup.alpha         = 1f;
            m_incomePanel.localPosition = Vector3.zero;
            m_incomeText.text           = income.AbbreviateNumber();

            m_currencyImage.sprite = currencyType == CurrencyType.Dollar ? m_dollarSprite : m_respectSprite;
        }
Ejemplo n.º 2
0
        public void DisplayInfo(float currency)
        {
            float price = m_dynamicParameter.Price;

            bool isMoneyEnough = currency >= price;
            bool isMaxLevel    = m_dynamicParameter.IsMaxLevel;

            m_priceText.text         = isMaxLevel ? StringConstants.UIText.MaxLevel : price.AbbreviateNumber();
            m_buyButton.interactable = (isMoneyEnough && !isMaxLevel) || IsAdUpgrade;

            m_valueText.text = string.Format(m_valueFormat, m_dynamicParameter.Value.AbbreviateNumber());

            m_walletImage.gameObject.SetActive(!isMaxLevel);

            m_adPrice.SetActive(IsAdUpgrade);
            m_walletPrice.SetActive(!IsAdUpgrade);
        }
Ejemplo n.º 3
0
        private void DisplayIncomeText()
        {
            int maxOfflineMinutes = ConfigManager.Instance.Get <GameConfig>().MaxOfflineIncomeMinutes;
            int maxHours          = Mathf.RoundToInt(maxOfflineMinutes / 60f);

            TimeSpan offlineTime = TimeManager.Instance.OfflineTime;

            if (offlineTime.TotalMinutes > maxOfflineMinutes)
            {
                offlineTime = new TimeSpan(maxHours, 0, 0);
            }

            string format = @"hh\:mm\:ss";

            m_infoText.text = string.Format(StringConstants.Formats.OfflineIncomeFormat, offlineTime.ToString(format), maxHours);

            OfflineIncome offlineIncome  = (OfflineIncome)ServiceLocator.Instance.Get <IncomeService>().GetIncome(IncomeType.Offline);
            float         respectOffline = offlineIncome.RespectIncome;
            float         dollarsOffline = offlineIncome.DollarsIncome;

            m_respectText.text = string.Format(StringConstants.Formats.PlusIncomeFormat, respectOffline.AbbreviateNumber());
            m_dollarsText.text = string.Format(StringConstants.Formats.PlusIncomeFormat, dollarsOffline.AbbreviateNumber());
        }
Ejemplo n.º 4
0
        public void DisplayUnlockPrice(float price, CurrencyType currencyType)
        {
            m_priceText.text = price.AbbreviateNumber();

            m_unlockCurrencyImage.sprite = currencyType == CurrencyType.Dollar ? m_dollarSprite : m_respectSprite;
        }
Ejemplo n.º 5
0
 private void DisplayCurrency(float value)
 {
     m_currencyText.text = value.AbbreviateNumber();
 }
Ejemplo n.º 6
0
        private void DisplayAutoCollectInfo(float currency)
        {
            float price              = m_targetBuilding.AutoCollectPrice;
            bool  isMoneyEnough      = currency >= price;
            bool  isAutoUnlockBought = m_targetBuilding.IsAutoCollectingEnabled;

            m_priceAutoCollectText.text         = isAutoUnlockBought ? string.Empty : price.AbbreviateNumber();
            m_autoCollectBuyButton.interactable = !isAutoUnlockBought && isMoneyEnough;
            m_autoCollectWalletImage.sprite     = m_targetBuilding.CurrencyType == CurrencyType.Dollar
                ? m_dollarsSprite
                : m_respectSprite;
        }