예제 #1
0
 protected override void SetupMenuSelection(MenuSelections menuSelection)
 {
     menuSelection.AddPick("start");
     menuSelection.AddPick("options");
     menuSelection.AddPick("highscore");
     menuSelection.AddPick("quit");
 }
예제 #2
0
 private void Start()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else if (instance == null)
     {
         instance = this;
     }
 }
예제 #3
0
        protected override void SetupMenuSelection(MenuSelections menuSelection)
        {
            menuSelection.AddSetting("controlls", new string[] { "simple ", "complex" });
            menuSelection.AddSetting("fps", new string[] { "60", "30", "20" });
            menuSelection.AddSetting("color", new string[] { "full", "none" });
            menuSelection.AddSetting("unicode", new string[] { "full", "limited" });
            menuSelection.AddPick("back");

            menuSelection.SetSettingState("fps", $"{_gameSettings.FPS}");
            menuSelection.SetSettingState("controlls", _gameSettings.Controlls);
            menuSelection.SetSettingState("color", $"{_gameSettings.Color}");
            menuSelection.SetSettingState("unicode", _gameSettings.Unicode);
        }
예제 #4
0
        protected override void SetupMenuSelection(MenuSelections menuSelection)
        {
            if (_place > -1)
            {
                string[] letters = new string[] {
                    "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
                    "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
                };

                menuSelection.AddSetting("letter 1", letters);
                menuSelection.AddSetting("letter 2", letters);
                menuSelection.AddSetting("letter 3", letters);
            }

            menuSelection.AddPick("back");
        }
예제 #5
0
 protected override void Initialize()
 {
     Load.Content = Content;
     IsMouseVisible = true;
     state = AppState.Menu;
     menuSelections = new MenuSelections();
     displayWidth = GraphicsDevice.Viewport.Width;
     displayHeight = GraphicsDevice.Viewport.Height;
     base.Initialize();
 }
예제 #6
0
 protected override void SetupMenuSelection(MenuSelections menuSelection)
 {
     menuSelection.AddPick("back");
 }
예제 #7
0
        public override void LoadGame(MenuSelections menuSelections)
        {
            this.Gamestate = GameState.Loading;
            string mapPath = "XmlData/Maps/" + menuSelections.MapName;
            LevelMapXMLData mapData = Load.LoadMapData(mapPath);
            map = new MazeMap(mapData);

            entity = new Ball("Graphics/ball", new Rectangle(110, 350, 40, 40), 5);
            checkPoint = new CheckPoint("Graphics/checkpoint", Rectangle.Empty);
            checkPoint.Color = Color.White;
            checkPoint.Visible = true;
            PositionCheckPoint();

            TotalGameTime = new TimeKeeper();
            dtoGameTime = new DrawableTextObject()
            {
                Color = Color.BlueViolet,
                Font = Load.LoadFont("Fonts/font"),
                Position = new Vector2(Width/3 + 50, 0),
                Visible = true,
            };

            TileMap tMap = map as TileMap;
            camera = new AdjustableTileCamera(ref tMap, Width, Height);
            camController = camera.GetController();
            camera.MonitorRectangle(entity);
            camera.LeftScrollPoint = 199;
            camera.RightScrollPoint = camera.Width - 199;
            camera.VerticalDisposition = entity.Height * 2;
            camera.TopScrollPoint = 199;
            camera.BottomScrollPoint = camera.Height - 150;
            camera.HorizontalDisposition = entity.Width * 2;
            camera.FixedHorizontalPoints = new Vector2(199, camera.Width - 199);
            camera.FixedVerticalPoints = new Vector2(199, camera.Height - 149);
            camera.SetEdgeCusionSpacing(100);
            camera.UseEdgeCusions = true;
            camera.ScrollTime = 250;
            TopBorder = LeftBorder = 0;
            RightBorder = Width;
            BottomBorder = Height;

            countDownTimer = 3;
            countDown = new DrawableTextObject()
            {
                Font = Load.LoadFont("Fonts/countDownFont"),
                Color = Color.BlueViolet,
                Position = new Vector2(325, 100),
                Visible = true,
                Text = new StringBuilder(countDownTimer.ToString())
            };

            Walls = new List<Wall>();
            CreateWalls();

            StartGame();
        }
예제 #8
0
파일: MenuScreen.cs 프로젝트: mino55/Tetris
 protected abstract void SetupMenuSelection(MenuSelections menuSelection);