예제 #1
0
 protected void RemoveGuiComponent(GuiBase gui)
 {
     if (gui != null && !(gui is Cursor) && guiComponents.Exists(x => string.Equals(x.Name, gui.Name)))
     {
         guiComponents.Remove(gui);
         gui.CallMethod("UnloadContent", null);
         gui.Dispose();
     }
 }
예제 #2
0
 protected void AddGuiComponent(GuiBase gui)
 {
     if (gui != null && !(gui is Cursor) && !guiComponents.Exists(x => string.Equals(x.Name, gui.Name)))
     {
         gui.Initialize();
         gui.CallMethod("LoadContent", null);
         guiComponents.Add(gui);
     }
 }