public int GetNetWorth() { ResourceBundle netWorth = new ResourceBundle(0, 0, 0); foreach (BuildingController building in app.controller.buildings) { if (building is ShipyardController) { netWorth += BuildingCosts.shipyard; } else if (building is ResourceBuildingController) { if (building.GetComponent <ResourceBuildingModel>().type == 0) { netWorth += BuildingCosts.farm; } else if (building.GetComponent <ResourceBuildingModel>().type == 1) { netWorth += BuildingCosts.huntersLodge; } else { netWorth += BuildingCosts.goldsmith; } } else if (building is ShipyardController) { netWorth += BuildingCosts.shipyard; } else if (building is EmbassyController) { netWorth += BuildingCosts.embassy; } } netWorth *= 1.2f; netWorth += ManagerModel.resourcesMain; return(ResourceBundle.ReturnWorth(netWorth)); }