MultiPlayer.UnitAttributes.SetAttackCooldownAttributes C# (CSharp) Method

SetAttackCooldownAttributes() public method

public SetAttackCooldownAttributes ( string mathExpression ) : void
mathExpression string
return void
        public void SetAttackCooldownAttributes(string mathExpression)
        {
            if (mathExpression.Equals("") || mathExpression.Length <= 0) {
                return;
            }
            if (this.attackCooldownPrefabList.Count > 0) {
                this.attackCooldownPrefabList.Clear();
            }
            float previousAnswer = 0f;
            for (int i = 0; i < Attributes.MAX_NUM_OF_LEVELS; i++) {
                float answer = (float)MathParser.ProcessEquation(mathExpression, AttributeProperty.AttackCooldown, i + 1, i, previousAnswer);
                this.attackCooldownPrefabList.Add(answer);
                previousAnswer = answer;
            }
        }