public void OnClose() { CloseUIForm(); NatureController.Instance.RecreateAllSpecies(); NaturalPanel np = UIManager.Instance.ShowUIForms <NaturalPanel>(); np.Initialize(); }
public void RecreateAllSpecies() { ClearAll(); NaturalPanel np = UIManager.Instance.GetBaseUIForm <NaturalPanel>(); np.RefreshButtonSelected(); foreach (string ggiName in AllSelectedGeoGroupInfoNames) { GeoGroupInfo ggi = AllGeoGroupInfo[ggiName]; Species species = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.Species].AllocateGameObject <Species>(transform); species.name = ggi.Name + "_Species"; species.MyGeoGroupInfo = ggi; AllSpecies.Add(ggi.Name, species); } np.Initialize(); }