Ejemplo n.º 1
0
    public void UpgradeFunction(float _damage, int _level, int _tir)
    {
        int level = UgradeLevel(_level);
        int price = upgratePrice[_tir];

        Calculate(benefitHelper.GetGold(), price);

        float newPrice = price + (price * Mathf.Sqrt(level));

        upgratePrice[_tir] = (int)newPrice;
        return;
    }
Ejemplo n.º 2
0
    public void GetHitMethod(float damage)
    {
        _health = startHealth - damage;

        barHelper.HealthBarUpdate(_health);

        if (_health <= 0)
        {
            gameHelper.TakeGold(benefitHelper.GetGold());
            Destroy(gameObject);
        }
        else
        {
            startHealth = _health;
        }
    }