示例#1
0
 public void SetIdler(Idler idler)
 {
     _idler        = idler;
     _image.sprite = _idler.IdlerObject.Icon;
     //maybe for variety sake, use a foreach to find the clicker upgrade in the IdlerObject's upgrade list.
     _tooltipTrigger.SetToolTipText(idler._playerClicker.ClickerName + ": " + idler.IdlerObject.idlerUpgrades[0].UpgradeCost.ToString(), idler._playerClicker.Description);
 }
示例#2
0
 public void SetIdler(Idler idler)
 {
     _idler      = idler;
     Icon.sprite = _idler.IdlerObject.Icon;
     Button.Subscribe(idler);
     _idler.OnLevelUpCallback += UpdateTextFields;
 }
    public void Subscribe(Idler idler)
    {
        //Cache reference to subscribed idler
        _idler = idler;

        //Set up Tooltip
        _tooltip.SetToolTipText("Level Up " + _idler.IdlerObject.name + " by One!",
                                "+ " + _idler.IdlerObject.BaseDamagePerLevel.ToString() + " Base DPS\n" +
                                "+ " + _idler.IdlerObject.BaseManaPerLevel.ToString() + " Base MPS");
    }
示例#4
0
 private void StopIdle()
 {
     Idler.Stop();
     foreach (var badge in AllBadges)
     {
         if (badge.CardIdleActive)
         {
             badge.CardIdleProcess.Stop();
         }
     }
 }
示例#5
0
 public override string ToString()
 {
     if (Stat == IdlerStat.Cost || Stat == IdlerStat.Mana)
     {
         return("Reduces " + Idler.ToString() + " " + Stat.ToString() + " by " + Math.Round((1 / Amount), 2).ToString() + ".\n");
     }
     else
     {
         return("Increases " + Idler.ToString() + " Damage by " + Amount.ToString() + ".\n");
     }
 }
    public void SetUpgrade(Idler idler, int i)
    {
        _idler = idler;

        IdlerObjectUpgrade idobUpgrade = idler.IdlerObject.idlerUpgrades[i];

        UpgradeCost = idobUpgrade.UpgradeCost;
        amount      = idobUpgrade.amount;
        Unlocked    = idobUpgrade.unlocked;
        if (Unlocked)
        {
            _image.color = Color.blue / 0.75f + Color.gray / 1.5f;
        }
    }