Esempio n. 1
0
        public void LoadMenu(Menu menu)
        {
            for (int i = 0; i < menu.Items.Count; i++) {
                var mi = menu.Items[i];

                switch (i) {
                    case 0:
                        mi.Position = new Vector2((int)topLeftPosition.X - 600, (int)topLeftPosition.Y - 600);
                        mi.RenderBalloons = true;

                        if (i + 1 <= menu.Items.Count - 1)
                            mi.RenderRopes = true;

                        TopLeft = mi;
                        TopLeft.Actions.AddAction(new TweenPositionTo(mi, topLeftPosition, 3f, Back.EaseOut), true);

                        break;
                    case 1:
                        mi.Position = new Vector2((int)bottomLeftPosition.X - 600, (int)bottomLeftPosition.Y + 600);
                        BottomLeft = mi;
                        BottomLeft.Actions.AddAction(new TweenPositionTo(mi, bottomLeftPosition, 3f, Back.EaseOut), true);

                        break;
                    case 2:
                        mi.Position = new Vector2((int)topRightPosition.X + 600, (int)topRightPosition.Y - 600);
                        mi.RenderBalloons = true;

                        if (i + 1 <= menu.Items.Count - 1)
                            mi.RenderRopes = true;

                        TopRight = mi;
                        TopRight.Actions.AddAction(new TweenPositionTo(mi, topRightPosition, 3f, Back.EaseOut), true);

                        break;
                    case 3:
                        mi.Position = new Vector2((int)bottomRightPosition.X + 600, (int)bottomRightPosition.Y + 600);
                        BottomRight = mi;
                        BottomRight.Actions.AddAction(new TweenPositionTo(mi, bottomRightPosition, 3f, Back.EaseOut), true);

                        break;
                    default:
                        throw new ArgumentException("No more than 4 menu items allowed!");
                }
            }

            AddEntity(menu);
        }
Esempio n. 2
0
 public MenuScreen(KinectContext context)
     : base(context)
 {
     MainMenu = new Menu();
 }
Esempio n. 3
0
        //public void LoadHighscoreMenu() {
        //    RemoveEntity(MainMenu);
        //    var highscore = new Menu();
        //    highscore.AddItem(new MenuItem(Assets.MenuSignCoop, 0, 0, OnClick_Highscore_Coop));
        //    highscore.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(highscore); LoadMenu(MainMenu); }));
        //    highscore.AddItem(new MenuItem(Assets.MenuSignSinglePlayer, 0, 0, OnClick_Highscore_Single));
        //    LoadMenu(highscore);
        //}
        public void LoadTutorialMenu()
        {
            RemoveEntity(MainMenu);

            var tutorial = new Menu();

            tutorial.AddItem(new MenuItem(Assets.MenuSignCoop, 0, 0, OnClick_Tutorial_CoopSingle));
            tutorial.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(tutorial); LoadMenu(MainMenu); }));
            tutorial.AddItem(new MenuItem(Assets.MenuSignSinglePlayer, 0, 0, OnClick_Tutorial_CoopSingle));
            tutorial.AddItem(new MenuItem(Assets.MenuSignVersus, 0, 0, OnClick_Tutorial_Versus));

            LoadMenu(tutorial);
        }
Esempio n. 4
0
        //public void LoadSettingsMenu() {
        //    RemoveEntity(MainMenu);
        //    var settings = new Menu();
        //    //MainMenu = settings;
        //    var addition = new CheckBox(Settings.type.Addition, Assets.MenuCheckboxAdditionOn, Assets.MenuCheckboxAdditionOff, 900, 100);
        //    AddEntity(addition);
        //    var subtraction = new CheckBox(Settings.type.Subtraction, Assets.MenuCheckboxSubtractionOn, Assets.MenuCheckboxSubtractionOff, 900, 300);
        //    AddEntity(subtraction);
        //    var muliplication = new CheckBox(Settings.type.Multiplication, Assets.MenuCheckboxMultiplicationOn, Assets.MenuCheckboxMultiplicationOff, 900, 500);
        //    AddEntity(muliplication);
        //    settings.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(settings); RemoveEntity(muliplication); RemoveEntity(subtraction); RemoveEntity(addition); LoadMenu(MainMenu); }));
        //    settings.AddItem(new MenuItem(Assets.MenuSignStartGame, 0, 0, OnClick_SinglePlayer));
        //    LoadMenu(settings);
        //}
        public void LoadSettingsMenuSinglePlayer()
        {
            RemoveEntity(MainMenu);

            var settings = new Menu();
            //MainMenu = settings;
            var addition = new CheckBox(Settings.type.Addition, Assets.MenuCheckboxAdditionOn, Assets.MenuCheckboxAdditionOff, 900, 100);
            AddEntity(addition);
            var subtraction = new CheckBox(Settings.type.Subtraction, Assets.MenuCheckboxSubtractionOn, Assets.MenuCheckboxSubtractionOff, 900, 300);
            AddEntity(subtraction);
            var muliplication = new CheckBox(Settings.type.Multiplication, Assets.MenuCheckboxMultiplicationOn, Assets.MenuCheckboxMultiplicationOff, 900, 500);
            AddEntity(muliplication);

            settings.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(settings); RemoveEntity(muliplication); RemoveEntity(subtraction); RemoveEntity(addition); LoadMenu(MainMenu); }));
            settings.AddItem(new MenuItem(Assets.MenuSignStartGame, 0, 0, OnClick_SinglePlayer));

            LoadMenu(settings);
        }
Esempio n. 5
0
        public void LoadOperatorMessageMenu()
        {
            RemoveEntity(MainMenu);

            var OperatorMessage = new Menu();

            MenuItem Ok = new MenuItem();
            var message = new MenuImage(Assets.MenuMessageNoOperatorChecked, 250, 100, new Point(825, 345), OnClick_Nothing);
            var background = new MenuImage(Assets.MenuPauseBackground, 0, 0, new Point(MainGame.Width, MainGame.Height), OnClick_Nothing);

            AddEntity(background);
            AddEntity(message);
            //Unschön, wie gehts anders?

            Ok = new MenuItem(Assets.MenuSignOk, 550, 500, delegate() { RemoveEntity(Ok); RemoveEntity(background); RemoveEntity(message); });
            AddEntity(Ok);

            LoadMenu(OperatorMessage);
        }
Esempio n. 6
0
        public void LoadMultiPlayerMenu()
        {
            RemoveEntity(MainMenu);

            var multiPlayer = new Menu();
            MainMenu = multiPlayer;

            multiPlayer.AddItem(new MenuItem(Assets.MenuSignVersus, 0, 0, OnClick_Versus));
            multiPlayer.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(multiPlayer); LoadMenu(MainMenu); }));
            multiPlayer.AddItem(new MenuItem(Assets.MenuSignCoop, 0, 0, OnClick_SettingsCoop));

            LoadMenu(multiPlayer);
        }
Esempio n. 7
0
        public void LoadHighscoreMenu()
        {
            RemoveEntity(MainMenu);

            var highscore = new Menu();

            highscore.AddItem(new MenuItem(Assets.MenuSignCoop, 0, 0, OnClick_Highscore_Coop));
            highscore.AddItem(new MenuItem(Assets.MenuSignMenu, 0, 0, delegate() { RemoveEntity(highscore); LoadMenu(MainMenu); }));
            highscore.AddItem(new MenuItem(Assets.MenuSignSinglePlayer, 0, 0, OnClick_Highscore_Single));

            LoadMenu(highscore);
        }