Beispiel #1
0
    public void ResolveValueStatuses()
    {
        float totalStatusChange = 0;

        for (int i = activeStatuses.Count - 1; i > -1; i--)
        {
            totalStatusChange -= activeStatuses[i].rate * Time.deltaTime;
            activeStatuses[i].currentDuration += Time.deltaTime;
            if (activeStatuses[i].currentDuration > activeStatuses[i].maxDuration)
            {
                foreach (ModifierGroup modifierGroup in activeStatuses[i].modifierGroups)
                {
                    totalStats.DecreaseStat(modifierGroup.Stat, modifierGroup.Aspect, modifierGroup.Method, modifierGroup.Value);
                }
                activeStatuses.RemoveAt(i);
            }
        }
        if (totalStatusChange != 0)
        {
            DamageManager.CalculateStatusDamage(this, totalStatusChange);
        }
    }