/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Window.Title = "Asteria"; IsMouseVisible = true; graphics.PreferredBackBufferWidth = 1440; graphics.PreferredBackBufferHeight = 900; graphics.IsFullScreen = false; graphics.ApplyChanges(); logger = new Logger("Asteria.log"); Logger.MessageReceived += new LoggerMsgEvent(ToLog); context = new Context(); context.Protocol = "0.1"; context.Game = this; config = new Config(); config.LoadDefaultConfig(); // Create texture manager to draw textures from. textureManager = new TextureManager(); // Create input manager to handle mouse/keyboard states. inputManager = new InputManager(context); context.Input = inputManager; // Create the zonemanager. zoneManager = new ZoneManager(context); context.ZoneManager = zoneManager; // Create the game interface. gameInterface = new GameInterface(context); context.Gui = gameInterface; gameInterface.InitInterface(); // Create the game network. gameNetwork = new GameNetwork(context); gameNetwork.ConnectToWorld("127.0.0.1", 5961, 1, "admin_testing"); context.Network = gameNetwork; // Create world manager. worldManager = new WorldManager(context); context.WorldManager = worldManager; base.Initialize(); }