public void Remove(CivilBuilding toRemove) { if (!this.m_resourceBuildingMap.ContainsKey(toRemove.Data.Resource)) { return; } this.m_resourceBuildingMap[toRemove.Data.Resource].Remove(toRemove); }
public void AddBuilding(CivilBuilding toAdd) { if (!this.m_resourceBuildingMap.ContainsKey(toAdd.Data.Resource)) { this.m_resourceBuildingMap.Add(toAdd.Data.Resource, new List <CivilBuilding>()); } this.m_resourceBuildingMap[toAdd.Data.Resource].Add(toAdd); }