public void AddStationToPlanet(Planet planet, CampaignFaction faction) { GameObject stationObject = (GameObject)Instantiate(stationPrefab, planet.transform.position, planet.transform.rotation); stationObject.transform.parent = planet.transform; CampaignStation station = stationObject.GetComponent<CampaignStation>(); faction.AddStation(station); station.planet = planet; planet.SetStation(station); UpdateSolarSystemInfoPlanets(); UpdateSolarSystemInfoFleets(); }
public void MakeStation(Planet planet) { GameObject stationObject = (GameObject)Instantiate(structureList.GetStationPrefab()); stationObject.transform.position = planet.transform.position; CampaignStation station = stationObject.GetComponent<CampaignStation>(); AddStation(station); planet.SetStation(station); }