// Sets the gui to the given gui internal override void setGUI(ref GUI pmGUI) { base.setGUI(ref pmGUI); for(int i= 0; i< containerSize; i++) components.items[i].setGUI(ref pmGUI); }
// Initiates the game private void preInitGame() { // Variables ModelContentStream mcs; difficulty= 0; pUpdateFunc= defaultUpdateFunc; pRenderFunc= defaultRenderFunc; e_input= null; loadedSounds= new FDictionary<string, Sound>(); loadedTextures= new FDictionary<string, Texture>(); loadedFonts= new FDictionary<string, Font>(); loadedModels= new ModelFactory(); window= new GameFrame(this); GameInput.init(this); content= new ContentManager(); statesys= new GameStateSystem(this); gui= new GUI(this); sounds= new AudioPlayer(this); host= new AServerHost(); mcs= new ModelContentStream(this); content.addReader(new TextureContentReader()); content.addReader(new FontContentReader(this)); content.addReader(new SoundContentReader()); content.addReader(mcs); content.addWriter(mcs); window.viewport.onRender+= render; }