Example #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            #region textures, fonts, and shaders
            font_Arial      = Content.Load <SpriteFont>("Arial");
            font_Arial_Bold = Content.Load <SpriteFont>("Arial_Bold");



            zoomEffect = Content.Load <Effect>("Effects/Zoom");

            playerTexture = Content.Load <Texture2D>("Player/Player");
            debugTexture  = Content.Load <Texture2D>("Debug");

            mouseTexture = Content.Load <Texture2D>("Gui/MousePointer");

            BuildUi        = Content.Load <Texture2D>("Gui/build_overlay");
            BuildUiPreview = Content.Load <Texture2D>("Gui/PreviewBorder");
            BuildUiFloor   = Content.Load <Texture2D>("Gui/build_overlay_floor");
            BuildUiWall    = Content.Load <Texture2D>("Gui/build_overlay_wall");
            BuildUiObject  = Content.Load <Texture2D>("Gui/build_overlay_object");

            selectedFloorTile  = GetFloorID <AirFloor>();
            selectedWallTile   = GetWallID <AirWall>();
            selectedObjectTile = GetObjectID <AirObject>();

            TileHandler.LoadTileTextures();
            NpcHandler.LoadNpcTextures();
            #endregion

            mainWorld = new World();
            mainWorld.Initialize();

            base.LoadContent();
        }