示例#1
0
        /// <summary>
        /// Initializing the MainMenu, adding Buttons and their functionality
        /// </summary>
        private static void MenuInit()
        {
            Menu MainMenu = new Menu(4);

            Action tempAction = new Action(StartGame);
            MainMenu.SetButton(0, "Start Game", tempAction);

            tempAction = new Action(StartEditor);
            MainMenu.SetButton(1, "Start Editor", tempAction);

            tempAction = new Action(ExitGame);
            MainMenu.SetButton(2, "End Game", tempAction);
        }
示例#2
0
        //FUNKTION DAS MAN MEHRERE SACHEN AUSWHÄLEN KANN??????? bzw erneut wählen kann
        private void MenuInit()
        {
            Player player = new Player(0, 0);

                Menu ShopMenu = new Menu(8);

                Action tempAction = new Action(BuyMP5);
                ShopMenu.SetButton(0, "MP5                  -   " + mp5value + "G", tempAction);

                tempAction = new Action(MP5Ammo);
                ShopMenu.SetButton(1, "MP5-Ammo + 10        -   " + mp5ammovalue + "G", tempAction);

                tempAction = new Action(BuyAk47);
                ShopMenu.SetButton(2, "AK47                 -   " + ak47value + "G", tempAction);

                tempAction = new Action(AKAmmo);
                ShopMenu.SetButton(3, "AK47-Ammo + 10       -   " + ak47ammovalue + "G", tempAction);

                tempAction = new Action(BuyRocketLauncher);
                ShopMenu.SetButton(4, "RocketLauncher       -   " + rlvalue + "G", tempAction);

                tempAction = new Action(RocketAmmo);
                ShopMenu.SetButton(5, "Rockets + 3          -   " + rocketvalue + "G", tempAction);

                tempAction = new Action(BuyArmor);
                ShopMenu.SetButton(6, "Armor + 5            -   " + armorvalue + "G", tempAction);

                tempAction = new Action(Exit);
                ShopMenu.SetButton(7, "Start next Level", tempAction);
        }