Пример #1
0
    public void UpdateDisplays()
    {
        costDisplay.text        = formatter.FormatNumber(Cost);
        levelDisplay.text       = "Level " + (Level + freeLevels).ToString("N0");
        levelSourceDisplay.text = level.ToString("N0") + " levels from upgrading";
        if (freeLevels > 0)
        {
            levelSourceDisplay.text += "\n" + freeLevels.ToString("N0") + " free levels from dropping coins";
        }
        if (diamond.diamondMultiLevels > 0)
        {
            levelSourceDisplay.text += "\n" + diamond.diamondMultiLevels.ToString("N0") + " levels from diamond upgrade";
        }

        multiplierDisplay.text = CoinMulti.ToString("N2") + "x coins";
        if (upgradeHandler.IsUpgradePurchased(204))
        {
            multiplierDisplay.text += "\n" + formatter.FormatNumber(upgradeHandler.GetEffect(204)) + "x clickpoints";
        }
        if (upgradeHandler.IsUpgradePurchased(304))
        {
            multiplierDisplay.text += "\n" + formatter.FormatNumber(upgradeHandler.GetEffect(304)) + "x experience";
        }
        if (upgradeHandler.IsUpgradePurchased(31))
        {
            multiplierDisplay.text += "\n+" + (Level * 0.75f).ToString("N1") + "% extra coin chance";
        }
        if (upgradeHandler.IsUpgradePurchased(45))
        {
            multiplierDisplay.text += "\n" + DiamondCoinMulti.ToString("N3") + "x diamond coins";
        }
    }
Пример #2
0
    public void SetCoinsTooltip()
    {
        List <object> objects = new List <object>();

        if (upgradeHandler.IsUpgradePurchased(1))
        {
            objects.Add(1 + Math.Log10(player.Clickpoints + 1) * 0.1);
        }
        if (upgradeHandler.IsUpgradePurchased(4))
        {
            objects.Add(1 + player.Level * 0.03);
        }
        if (upgradeHandler.IsUpgradePurchased(18))
        {
            objects.Add(1 + autoclicker.bonus);
        }
        if (upgradeHandler.IsUpgradePurchased(32) && autoclicker.surgeTimeRemaining > 0f)
        {
            objects.Add(1 + (autoclicker.surgeTimeRemaining * 0.05));
        }
        objects.Add(progressBar.GetTotalMultiplier());
        if (upgradeHandler.IsUpgradePurchased(51))
        {
            objects.Add(progressBar.barMulti[0]);
        }
        objects.Add(multi.CoinMulti);
    }
    public float SpeedMulti()
    {
        float f = speedMultiLevel * speedMultiLevel2;

        if (clicker.coinIsHeld && upgradeHandler.IsUpgradePurchased(52))
        {
            f *= 2;
        }
        return(f);
    }
Пример #4
0
 // Update is called once per frame
 void Update()
 {
     if (upgradeHandler.IsUpgradePurchased(37))
     {
         AutoPriceDisplay.text = autoPrice.ToString("N0");
     }
     if (upgradeHandler.IsUpgradePurchased(38))
     {
         MultiPriceDisplay.text = multiPrice.ToString("N0");
     }
     if (upgradeHandler.IsUpgradePurchased(39))
     {
         DropPriceDisplay.text = dropPrice.ToString("N0");
     }
 }
Пример #5
0
    // Update is called once per frame
    void Update()
    {
        timeUntilClick -= Time.deltaTime * Convert.ToSingle(Math.Min(clicksPerSec, 50));
        while (timeUntilClick < 0)
        {
            Autoclick();
        }

        progressBar.value = 1 - timeUntilClick;
        if (upgradeHandler.IsUpgradePurchased(28))
        {
            UpdateSurgeDuration();
        }
        if (upgradeHandler.IsUpgradePurchased(44))
        {
            if (UnityEngine.Random.Range(0f, 1f) < 1 - Mathf.Pow(0.9999f, Convert.ToSingle(clickOverflowBonus)))
            {
                drop.platinum = true;
            }
        }
    }
Пример #6
0
    public override void UpdateTooltipText()
    {
        switch (tooltipType)
        {
        case 0:
            stringToDisplay = "Clicker";
            break;

        case 1:
            stringToDisplay = "Upgrades";
            break;

        case 2:
            stringToDisplay = "Booster\n\n<color=lime>{0}</color> Total Levels";
            objects.Add(multiplier.Level + multiplier.freeLevels);
            if (upgradeHandler.IsUpgradePurchased(34))
            {
                stringToDisplay += "\n<color=lime>{1}</color> Purchased\n<color=lime>{2}</color> From Dropping Coins";
                objects.Add(multiplier.level);
                objects.Add(multiplier.freeLevels);
            }
            break;

        case 3:
            stringToDisplay = "Autoclicker\n\n<color=lime>{0}</color> Total Levels";
            objects.Add(autoclicker.Level);
            break;

        case 4:
            stringToDisplay = "Diamond Upgrades";
            break;

        case 5:
            stringToDisplay = "Progress Bars";
            break;

        case 6:
            stringToDisplay = "Options";
            break;

        default:
            stringToDisplay = "<color=red>A tooltip should be here but it is missing.\nPlease report this bug.</color>";
            break;
        }
    }
Пример #7
0
    public double ResourceMultiplier()
    {
        double d = 160;

        if (upgradeHandler.IsUpgradePurchased(26))
        {
            double clicks = auto.clicksPerSec * 7.5;
            if (clicker.coinIsHeld && upgradeHandler.IsUpgradePurchased(16))
            {
                clicks /= 1.15;
            }
            if (auto.surgeTimeRemaining > 0)
            {
                clicks /= 2;
            }
            d += clicks;
        }
        return(d);
    }