Exemple #1
0
 public GameSession(GraphicsDevice graphicsDevice, ContentManager Content, Game1 gameInstance)
 {
     this.GameInstance   = gameInstance;
     this.Content        = Content;
     this.graphicsDevice = graphicsDevice;
     NetworkManager      = new NetworkManager(this);
     graphicsUI          = new GraphicsUI(graphicsDevice, this);
     DatabaseManager     = new DatabaseManager();
 }
Exemple #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //Network entity data
            NetworkManager.LoadNetworkContent();

            //Supply network player
            NetworkPlayer.Content        = Content;
            NetworkPlayer.graphicsDevice = GraphicsDevice;

            //Load player standards
            PlayerStandards.LoadPlayerTypes();

            GraphicsUI.LoadContent(Content, GraphicsDevice);
            GameMap.LoadMapContent(Content);

            //Load GameSession
            GameSession = new GameSession(GraphicsDevice, Content, this);
        }