Provides a simple to use interface for sending/recieving Lidgren messages
Esempio n. 1
0
        /// <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()
        {
            base.Initialize();

            spriteBatch = Manager.Renderer.SpriteBatch as SpriteBatch; //Set the spritebatch to the Neoforce managed one
            DefaultFont = Manager.Skin.Fonts["Default8"].Resource; //Default font we can use for drawing later

            NetManager = new NetworkManager();
            MsgHandler = new MessageHandler(this);
        }