Example #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// </summary>
        public override void LoadContent()
        {
            // Main storage bank
            Storage = new BankStorage("data/Game.bnk");
            ResourceManager.AddStorage(Storage);
            ResourceManager.RootDirectory = "data";


            GameWindowParams param = new GameWindowParams();

            param.Major      = 2;
            param.Minor      = 1;
            param.Compatible = false;
            param.Size       = new Size(640, 400);
            param.FullScreen = Settings.GetBool("FullScreen");
            CreateGameWindow(param);

            using (Stream icon = Storage.OpenFile("GameIcon.ico", FileAccess.Read))
                Window.Icon = new Icon(icon);
            Window.Text = "Dungeon Eye - http://www.dungeoneye.net";


            // Remove Multi sampling
            Display.RenderState.MultiSample = false;


            // Default texture parameters
            Texture2D.DefaultBorderColor = Color.Black;
            Texture2D.DefaultMagFilter   = TextureMagFilter.Nearest;
            Texture2D.DefaultMinFilter   = TextureMinFilter.Nearest;



            // Change the cursor
            Mouse.LoadTileSet(ResourceManager.CreateAsset <TileSet>("Cursor"));
            Mouse.SetTile(0);

            GSM.AddScreen(new MainMenu());
            //GSM.AddScreen(new GameScreen());
            //GSM.AddScreen(new IntroScreen());
            //GSM.AddScreen(new CharGen());
        }