Exemplo n.º 1
0
    public void tempBoost(ushort boost)
    {
        this.boost += boost;
        float prevHealth = realizedStats.maxHealth;

        realizedStats = cat.getTemporaryBoost(this.boost);
        currentHealth = (currentHealth * realizedStats.maxHealth) / prevHealth;
    }
Exemplo n.º 2
0
    private void setStats(Cat cat)
    {
        updateCatLevelUI(cat);
        GameControl.GetTextBox(transform, "rarity").SetText(GameControl.GenerateStarText(cat.getCatAsset().rarity, true));
        CatDynamicStatsRealized realizedStats = cat.getRealizedStats();

        Debug.Log("projectile speed: " + realizedStats.projectileSpeed + " speed: " + realizedStats.speed);
        getStats().text = realizedStats.maxHealth.ToString() + "\n" +
                          realizedStats.attackDamage.ToString() + "\n" +
                          realizedStats.projectileSpeed.ToString("0.0") + "\n" +
                          realizedStats.speed.ToString("0.0") + "\n" +
                          cat.getCatAsset().secondaryType.ToString() + "\n" +
                          cat.getCatAsset().action.ToString();
    }
Exemplo n.º 3
0
    public CatDynamicStatsRealized getRealizedStatsFromLevel(CatLevel level)
    {
        //TODO we have algorithm as linear, if it was different we would do a different algo here
        float percentageToMaxLevel            = level.getPercentageToMaxLevel();
        CatDynamicStatsRealized realizedStats = new CatDynamicStatsRealized();

        realizedStats.maxHealth    = (uint)Mathf.Lerp(baseMaxHealth, maxMaxHealth, percentageToMaxLevel);
        realizedStats.speed        = getRealizedSpeedFromLevel(level, percentageToMaxLevel);
        realizedStats.attackDamage = (uint)Mathf.Lerp(baseAttackDamage, maxAttackDamage, percentageToMaxLevel);
        // realizedStats.attackCooldown = (uint)Mathf.Lerp(baseAttackCooldown, maxAttackCooldown, percentageToMaxLevel);
        // realizedStats.range = (uint)Mathf.Lerp(baseRange, maxRange, percentageToMaxLevel);
        realizedStats.projectileSpeed = Mathf.Lerp(baseProjectileSpeed, maxProjectileSpeed, percentageToMaxLevel);
        return(realizedStats);
    }
Exemplo n.º 4
0
 public void setStats()
 {
     realizedStats = cat.getRealizedStats();
     currentHealth = realizedStats.maxHealth;
 }