void Update() { if (ShowSettings && !UiList.ContainsKey("Settings")) { SettingsView setting = new SettingsView(); setting.Initialize(); setting.SetVisible(true); UiList.Add("Settings", setting); } else if (!ShowSettings && UiList.ContainsKey("Settings")) { UiList["Settings"].SetVisible(false); UiList["Settings"].Terminate(); UiList.Remove("Settings"); } if (ShowRecapWindow && !UiList.ContainsKey("Recap")) { WindowRecap recap = new WindowRecap(); recap.Initialize(); recap.SetVisible(true); UiList.Add("Recap", recap); } else if (!ShowRecapWindow && UiList.ContainsKey("Recap")) { UiList["Recap"].SetVisible(false); UiList["Recap"].Terminate(); UiList.Remove("Recap"); } }
void Update() { if (ShowSettings && !UiList.ContainsKey("Settings")) { SettingsView setting = new SettingsView(); setting.Initialize(); setting.SetVisible(true); UiList.Add("Settings", setting); } else if (!ShowSettings && UiList.ContainsKey("Settings")) { UiList["Settings"].SetVisible(false); UiList["Settings"].Terminate(); UiList.Remove("Settings"); } if (ShowRecapWindow && !UiList.ContainsKey("Recap")) { WindowRecap recap = new WindowRecap(); recap.Initialize(); recap.SetVisible(true); UiList.Add("Recap", recap); } else if (!ShowRecapWindow && UiList.ContainsKey("Recap")) { UiList["Recap"].SetVisible(false); UiList["Recap"].Terminate(); UiList.Remove("Recap"); } }