public virtual bool CanUpgrade(InfrastructureLevelType typeToUpgrade) { if (!this.Upgrades.ContainsKey(typeToUpgrade)) { return(false); } var upgradeLevel = this.GetNextUpgrade(typeToUpgrade); if (upgradeLevel == null) { return(false); } //var currentTime = BusinessManager.GameManager.TimeManager.GetGameTime(); //if (currentTime < upgradeLevel.CreationDate) // return false; return(BusinessManager.Money - upgradeLevel?.BuildCost > 0); }
public IInfrastructureLevel GetCurrentLevel(InfrastructureLevelType infrastructureLevelType) { return(!this.CurrentLevelsDict.ContainsKey(infrastructureLevelType) ? null : this.CurrentLevelsDict[infrastructureLevelType]); }