public void AddComponent(SystemComponentBase systemComponent) { components.Add(systemComponent); if ((isMultiply && components.Count > 2) || (!isMultiply && components.Count > 1) || systemComponent.Type != componentType) { hasError = true; } }
public void AddComponent(SystemComponentBase component) { this.Price += component.Price; components[component.Type].AddComponent(component); }