コード例 #1
0
        public void ShowMainMenu()

        {
            Render();
            do
            {
                ConsoleKeyInfo pressedChar = Console.ReadKey(true);

                switch (pressedChar.Key)
                {
                case ConsoleKey.P:
                {
                    PlayerSelectionMenu playerSelectionMenu = new PlayerSelectionMenu();
                    playerSelectionMenu.ShowPlayerSelectionMenu();
                    break;
                }

                case ConsoleKey.C:
                {
                    CreditWindow creditWindow = new CreditWindow();
                    creditWindow.Render();
                    Console.ReadKey();
                    ShowMainMenu();
                    break;
                }

                case ConsoleKey.Q:
                {
                    Environment.Exit(0);
                    break;
                }
                }
            } while (checkingKeys);
        }
コード例 #2
0
 public GuiController()
 {
     _menuWindow      = new MenuWindow();
     _creditWindow    = new CreditWindow();
     _exitWindow      = new ExitWindow();
     _gameOverWindow  = new GameOverWindow();
     _highScoreWindow = new HighScoreWindow();
 }
コード例 #3
0
        public Buttons_GUI_Controller(CreditWindow creditWindow, GameWindow gameWindow)
        {
            CreditWindow _CreditWindow = creditWindow;
            GameWindow   _GameWindow   = gameWindow;

            ButtonsInGameWindows   = CreateButtonsList(_GameWindow.startButton, _GameWindow.creditsButton, _GameWindow.quitButton); // suarasai kokius nori mygtukus itraukti
            ButtonsInCreditWindows = CreateButtonsList(_CreditWindow.backButton);
        }
コード例 #4
0
        public GuiController()
        {
            gameWindow     = new GameWindow();
            creditWindow   = new CreditWindow();
            gameController = new GameController();

            //Frame testWindow = new Frame(0, 20, 0, 40, '.');
            //testWindow.Render();
        }
コード例 #5
0
ファイル: GuiController.cs プロジェクト: neoalik/ND3
        private void ShowCredit()
        {
            if (creditWindow == null)
            {
                creditWindow = new CreditWindow();
                gameWindows.Add(creditWindow);
            }

            creditWindow.Render();
        }
コード例 #6
0
    static void Main()
    {
        Console.CursorVisible = false;
        GameWindow   gameWindow   = new GameWindow();
        CreditWindow creditWindow = new CreditWindow();

        Console.ReadKey();

        StartGame();
        Console.ReadKey();
    }
コード例 #7
0
        public void ShowCreditMenu()
        {
            creditWindow = new CreditWindow(10, 10, 14, 14);
            creditWindow.Render();
            ConsoleKeyInfo pressedChar;

            do
            {
                pressedChar = Console.ReadKey(true);
            } while (pressedChar.Key != ConsoleKey.Enter);
            menuWindow.Render();
        }
コード例 #8
0
        // KONSTRUKTORIUS

        public Main_GUI_Controller()
        {
            CreditWindow = new CreditWindow();
            GameWindow   = new GameWindow();
            _myGame      = new GameController();


            _Render_Controller      = new Render_GUI_Controller(CreditWindow, GameWindow);
            _Gui_Buttons_Controller = new Buttons_GUI_Controller(CreditWindow, GameWindow);

            _ButtonsInGameWindow = _Gui_Buttons_Controller.ButtonsInGameWindows;

            _Gui_User_Controller = new User_GUI_Controller(_ButtonsInGameWindow, _myGame, _Render_Controller, GameWindow, _Gui_Buttons_Controller);
        }
コード例 #9
0
        static void Main(string[] args)
        {
            Console.CursorVisible = false;

            GameWindow gameWindow = new GameWindow();

            CreditWindow creditWindow = new CreditWindow();

            GuiController guiController = new GuiController(gameWindow, creditWindow);

            guiController.ShowMenu();
            guiController.UserActivity();


            Console.WriteLine("PROGRAMA BAIGTA");
        }
コード例 #10
0
        static void Main()
        {
            Console.CursorVisible = false;

            GameWindow gameWindow = new GameWindow();

            gameWindow.Render();

            CreditWindow creditWindow = new CreditWindow();

            creditWindow.Render();

            Console.ReadKey();

            //GameController myGame = new GameController();
            //myGame.StartGame();
        }
コード例 #11
0
 public GameOverControler(int lvl)
 {
     gameWindow   = new GameOverWindow(gameOverMenuButons.Replay.ToString(), gameOverMenuButons.MainMenu.GetDescription(), gameOverMenuButons.Quit.ToString(), lvl);
     creditWindow = new CreditWindow();
 }
コード例 #12
0
        //MyGameGui.GameWindow gameWindow = new MyGameGui.GameWindow();



        public void ShowMenu()
        {
            GameWindow    _gameWindow  = new GameWindow();
            CreditWindow  creditWindow = new CreditWindow();
            GameControler NewGame      = new GameControler();

            _gameWindow.AllButtons[0].SetActive();
            _gameWindow.Render();


            int  i            = 0;
            int  k            = 0;
            int  q            = _gameWindow.ButtonNr();
            bool needToRender = true;

            do
            {
                //Console.Clear();
                while (Console.KeyAvailable)
                {
                    ConsoleKeyInfo pressedChar = Console.ReadKey(true);


                    switch (pressedChar.Key)
                    {
                    case ConsoleKey.Escape:
                        needToRender = false;
                        break;

                    case ConsoleKey.RightArrow:
                        k = i;
                        if (i == q)
                        {
                            i -= q;
                        }
                        else
                        {
                            i += 1;
                        }

                        _gameWindow.AllButtons[i].SetActive();
                        _gameWindow.AllButtons[i].Render();
                        _gameWindow.AllButtons[k].SetInActive();
                        _gameWindow.AllButtons[k].Render();
                        break;

                    case ConsoleKey.LeftArrow:
                        k = i;
                        if (i == 0)
                        {
                            i += q;
                        }
                        else
                        {
                            i -= 1;
                        }
                        _gameWindow.AllButtons[i].SetActive();
                        _gameWindow.AllButtons[i].Render();
                        _gameWindow.AllButtons[k].SetInActive();
                        _gameWindow.AllButtons[k].Render();
                        break;

                    case ConsoleKey.Enter:
                        if (i == 0)
                        {
                            NewGame.StartGame();
                            _gameWindow.Render();
                        }
                        else if (i == 1)
                        {
                            creditWindow.ShowCredits();
                            _gameWindow.Render();
                        }
                        else
                        {
                            needToRender = false;
                        }
                        break;
                    }
                }
            } while (needToRender);
        }
コード例 #13
0
 public Render_GUI_Controller(CreditWindow creditWindow, GameWindow gameWindow)
 {
     _creditWindow = creditWindow;
     _gameWindow   = gameWindow;
 }
コード例 #14
0
 public GuiController()
 {
     gameWindow   = new GameWindow();
     creditWindow = new CreditWindow();
     myGame       = new GameController();
 }
コード例 #15
0
 public GuiController() // guicontroller konstruktorius sukuria game ir credit window objektus
 {
     GameWindow   _gameWindow   = new GameWindow();
     CreditWindow _creditWindow = new CreditWindow();
 }
コード例 #16
0
 public GuiControler()
 {
     gameWindow     = new GameWindow();
     creditWindow   = new CreditWindow();
     gameController = new GameController(this);
 }
コード例 #17
0
        /// <summary>
        /// Контекстное меню.  добавление кредита
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnAddLizing_Click(object sender, RoutedEventArgs e)
        {
            CreditWindow CW = new CreditWindow(this.lvClients.SelectedItem as IBankClient);

            CW.Show();
        }
コード例 #18
0
 public MainMenuControler()
 {
     gameWindow   = new MainMenuWindow(mainMenuButons.Start.ToString(), mainMenuButons.Credits.ToString(), mainMenuButons.Quit.ToString());
     creditWindow = new CreditWindow();
 }
コード例 #19
0
        public void ShowCreditWindow()
        {
            CreditWindow creditWindow = new CreditWindow();

            creditWindow.Render();
        }
コード例 #20
0
 public void ShowCreditWindow()
 {
     creditWindow = new CreditWindow(28, 10, 60, 18, '%');
     creditWindow.Render();
     ActivateCreditMenu();
 }
コード例 #21
0
 public PauseMenuControler()
 {
     gameWindow   = new PauseWindow(gameOverMenuButons.Continue.ToString(), gameOverMenuButons.MainMenu.GetDescription(), gameOverMenuButons.Quit.ToString());
     creditWindow = new CreditWindow();
 }