public void CleanupGUI(Dictionary <string, object> guiState) { PlayingGUI gui = GameWorld.Find("PlayingGui") as PlayingGUI; gui.Remove(gui.Find("playerName" + guid.ToString())); if (Id == LocalPlayerName && GameWorld != null) { PlayerInventoryAndEquipment pIaE = gui.Inventory; StatScreen pSs = gui.CharacterScreen; guiState.Add("playerIaEVisibility", pIaE.Visible); guiState.Add("playerIaEPosition", pIaE.Position); guiState.Add("playerSsVisibility", pSs.Visible); guiState.Add("playerSsPosition", pSs.Position); SkillBar skillbar = gui.Find(obj => obj is SkillBar) as SkillBar; guiState.Add("skillBarVisibility", skillbar.Visible); guiState.Add("skillbarPosition", skillbar.Position); gui.RemoveImmediatly(gui.Find("HealthBar")); gui.RemoveImmediatly(gui.Find("ManaBar")); gui.RemoveImmediatly(gui.Find("ActionBar")); gui.RemoveImmediatly(gui.Find("ExpBar")); gui.RemoveImmediatly(pIaE); gui.RemoveImmediatly(pSs); gui.RemoveImmediatly(mouseSlot); gui.RemoveImmediatly(skillbar); } }
public void CleanupGUI(Dictionary <string, object> guiState) { if (hpBar != null && GameWorld != null) { PlayingGUI pg = GameWorld.Find("PlayingGui") as PlayingGUI; pg.RemoveImmediatly(hpBar); } }