Beispiel #1
0
        public EditorScreen()
            : base("Editor Screen")
        {
            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            EditMode = 0;

            ExitButton = new MenuButton(new ExitButtonStyle(ScreenManager.Game.Content));
            SaveButton = new MenuButton(new SaveMapButtonStyle(ScreenManager.Game.Content));
            LoadButton = new MenuButton(new LoadMapButtonStyle(ScreenManager.Game.Content));

            BGLayerButton = new MenuButton(new BGLayerButton(ScreenManager.Game.Content));
            MiddleLayerButton = new MenuButton(new MiddleLayerBytton(ScreenManager.Game.Content));
            FGLayerButton = new MenuButton(new FGLayerButton(ScreenManager.Game.Content));

            TileLayerButton = new MenuButton(new TileLayerButton(ScreenManager.Game.Content));
            CollisionLayerButton = new MenuButton(new CollisionLayerButton(ScreenManager.Game.Content));
            JumpLayerButton = new MenuButton(new JumpLayerButton(ScreenManager.Game.Content));

            ColorPicker = new ColorPicker(new ColorPickStyle(ScreenManager.Game.Content));

            MenuEntries.Add(ExitButton);
            MenuEntries.Add(SaveButton);
            MenuEntries.Add(LoadButton);

            #region TileButtons
            ToolButtons = new List<MenuButton>();
            //ToolButtons.Add(new MenuButton(new Tile0(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile1(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile2(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile3(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile4(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile5(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile6(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile7(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile8(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile9(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile10(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile11(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile12(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile13(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile14(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Tile15(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new JumpTileButton(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new GoalTileButton(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Spike1Button(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new Spike2Button(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile0(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile1(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile2(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile3(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile4(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile5(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile6(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile7(ScreenManager.Game.Content)));
            //ToolButtons.Add(new MenuButton(new BGTile8(ScreenManager.Game.Content)));

            //ToolButtons.Add(new MenuButton(new EnemyButton(ScreenManager.Game.Content)));

            #endregion

            for (int i = 0; i < 56; i++)
            {
                int x = i % 8;
                int y = i / 8;

                ToolButtons.Add(new MenuButton(new DynamicTileButton(x, y, 40, ScreenManager.Game.Content)));
            }

            ToolButtons.Add(new MenuButton(new PlayerButton(ScreenManager.Game.Content)));
        }
Beispiel #2
0
        public EditorScreen()
            : base("Editor Screen")
        {
            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            ExitButton = new MenuButton(new ExitButtonStyle(ScreenManager.Game.Content));
            SaveButton = new MenuButton(new SaveMapButtonStyle(ScreenManager.Game.Content));
            LoadButton = new MenuButton(new LoadMapButtonStyle(ScreenManager.Game.Content));

            BGLayerButton = new MenuButton(new BGLayerButton(ScreenManager.Game.Content));
            MiddleLayerButton = new MenuButton(new MiddleLayerBytton(ScreenManager.Game.Content));
            FGLayerButton = new MenuButton(new FGLayerButton(ScreenManager.Game.Content));

            TileLayerButton = new MenuButton(new TileLayerButton(ScreenManager.Game.Content));
            CollisionLayerButton = new MenuButton(new CollisionLayerButton(ScreenManager.Game.Content));
            JumpLayerButton = new MenuButton(new JumpLayerButton(ScreenManager.Game.Content));

            MenuEntries.Add(ExitButton);
            MenuEntries.Add(SaveButton);
            MenuEntries.Add(LoadButton);

            #region TileButtons
            ToolButtons = new List<MenuButton>();
            ToolButtons.Add(new MenuButton(new Tile0(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile1(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile2(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile3(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile4(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile5(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile6(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile7(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile8(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile9(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile10(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile11(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile12(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile13(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile14(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Tile15(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new JumpTileButton(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new GoalTileButton(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Spike1Button(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new Spike2Button(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile0(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile1(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile2(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile3(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile4(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile5(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile6(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile7(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new BGTile8(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new PlayerButton(ScreenManager.Game.Content)));
            ToolButtons.Add(new MenuButton(new EnemyButton(ScreenManager.Game.Content)));

            #endregion
        }