public void AddSpeedModifier(SpeedCoef _speedCoef) { if (!_speedCoef.stackable) { foreach (SpeedCoef i_coef in speedCoefs) { if (i_coef.reason == _speedCoef.reason) { return; } } } speedCoefs.Add(_speedCoef); }
public SpeedCoef AddNewSpeedModifier(SpeedCoef _newModifier) { ballInformations.speedModifiers.Add(_newModifier); return(_newModifier); }