Exemplo n.º 1
0
        IEnumerator LifeRegenRoutine()
        {
            float temp = 0;

            while (true)
            {
                yield return(new WaitForSeconds(1));

                temp += lifeRegenRate + PerkManager.GetLifeRegenModifier();
                int value = 0;
                while (temp >= 1)
                {
                    value += 1;
                    temp  -= 1;
                }
                if (value > 0)
                {
                    _GainLife(value);
                }
            }
        }