Пример #1
0
        void UpdateStats()
        {
            float statprogresscolor = 0;

            for (int i = 0; i < 8; i++)
            {
                string pre = "";
                if ((Char.GetStatImproved((Stat)i) > Char.GetStat((Stat)i)))
                {
                    pre = "+";
                }
                UpgradeStatText[i].SetText((Stat)i + " : " + Char.GetNaturalStat((Stat)i) + " + " + Char.GetAddStat((Stat)i) + " (" + pre + (Char.GetStatImproved((Stat)i) - Char.GetStat((Stat)i)) + ")");
                statprogresscolor         = (float)Char.GetStatXP((Stat)i) / (float)Char.GetStatXPMax((Stat)i);
                StatProgress[i].TextColor = new Color(127, (int)(280 * statprogresscolor), (int)(243 * statprogresscolor));
                StatProgress[i].SetText(Char.GetStatXP((Stat)i) + " / " + Char.GetStatXPMax((Stat)i));
                progressStatsBar[i].color = new Color((int)(200 * (1 - statprogresscolor)), (int)(280 * statprogresscolor), (int)(130 * statprogresscolor) + 50, 1);;
            }
            for (int i = 0; i < 5; i++)
            {
                UpgradeStatDetails[i + 3].SetText((DamageType)i + " Damage Multiplier : " + Char.GetDamageMult((DamageType)i, 2) + " - " + Char.GetDamageMult((DamageType)i) + " x " + Char.GetDamageMult((DamageType)i, 1));
            }
            UpgradeStatDetails[0].SetText("Health : " + Char.player.statLifeMax2 + " - " + (Char.player.statLifeMax / 20) + " Heart x " + Char.GetHealthMult() + " x " + Char.GetHealthPerHeart() + " Health Per Heart + 10");
            UpgradeStatDetails[1].SetText("Mana : " + Char.player.statManaMax2 + " - " + (Char.player.statManaMax / 20) + " Crystal x " + Utils.Mathf.Clamp(Char.GetManaPerStar(), 0, 20) + " Mana per crystal + 4");
            UpgradeStatDetails[2].SetText("Defense : " + Char.player.statDefense + " - " + Char.BaseArmor + " Armor x " + Char.GetDefenceMult() + " x " + Char.GetArmorMult() + " Defense Per Armor");

            UpgradeStatDetails[8].SetText("Crit Chance : + " + Char.GetCriticalChanceBonus() + "%");
            UpgradeStatDetails[9].SetText("Crit Damage : " + (Char.GetCriticalDamage() * 100) + "%");
            UpgradeStatDetails[10].SetText("HealthRegen : +" + (Char.player.lifeRegen - Utils.Mathf.FloorInt(Char.GetHealthRegen()) + Char.GetHealthRegen()) * 0.5f + " Per Sec");
            UpgradeStatDetails[11].SetText("ManaRegen : +" + (Char.player.manaRegen - Utils.Mathf.FloorInt(Char.GetManaRegen()) + Char.GetManaRegen()) * 0.5f + " Per Sec");
            PointsLeft.SetText("Points : " + Char.FreePtns + " / " + Char.TotalPtns, 1, true);
        }