コード例 #1
0
        public FinishGame(ContentManager content, GraphicsDeviceManager graphics)
        {
            this.graphics = graphics;

            Textures = LoadContent.LoadListContent <Texture2D>(content, "Finish");

            Fonts = LoadContent.LoadListContent <SpriteFont>(content, "Font");
        }
コード例 #2
0
        public MainMenu(ContentManager content, GraphicsDeviceManager graphics)
        {
            Textures = LoadContent.LoadListContent <Texture2D>(content, "MainMenu");

            this.graphics = graphics;

            Buttons = new Dictionary <string, Button>()
            {
                //когда-нибудь убрать магические чиселки
                { "start", new Button(new Rectangle(150, 90, 200, 60), Textures["startGame"]) },
                { "rules", new Button(new Rectangle(150, 170, 200, 60), Textures["rules"]) },
                { "about", new Button(new Rectangle(150, 250, 200, 60), Textures["about"]) },
                { "exit", new Button(new Rectangle(150, 330, 200, 60), Textures["exit"]) }
            };
        }
コード例 #3
0
        public SokoGame(ContentManager content, GraphicsDeviceManager graphics)
        {
            this.graphics = graphics;

            mapCreator = new CreatureMapCreator();

            Textures = LoadContent.LoadListContent <Texture2D>(content, "Graphics");

            Fonts = LoadContent.LoadListContent <SpriteFont>(content, "Font");

            var mapsStrList = LoadFiles.LoadFilesFromDirectory();

            Maps = mapCreator.CreateMap(mapsStrList);

            Scores      = 0;
            levelNumber = 0;
            SetNextMap(levelNumber);
        }