Example #1
0
        internal void MoveSelectedUp()
        {
            selectedElement.Update();

            counter += list.Length - 1;
            int index = counter % list.Length;

            selectedElement = Elements[list[index]];
            selectedElement.UpdateReverseColours();
        }
Example #2
0
        private void init()
        {
            Render();
            Audio.StartServiceTrack("gameover");
            selectedElement.UpdateReverseColours();


            exit = false;
            do
            {
                pressedKey = Console.ReadKey(true);

                switch (pressedKey.Key)
                {
                case ConsoleKey.Escape:
                    exit = true;
                    ExitAction();
                    pressedKey = new ConsoleKeyInfo();
                    break;

                case ConsoleKey.R:
                    exit = true;
                    PlayAgain();
                    break;

                case ConsoleKey.DownArrow:
                    MoveSelectedDown();
                    pressedKey = new ConsoleKeyInfo();
                    break;

                case ConsoleKey.UpArrow:
                    MoveSelectedUp();
                    pressedKey = new ConsoleKeyInfo();
                    break;

                case ConsoleKey.Enter:
                    exit = true;
                    EnterAction();
                    break;
                }
            } while (!exit);
        }
Example #3
0
 public void MoveSelectedDown()
 {
     selectedElement.Update();
     selectedElement = Elements[list[++counter % list.Length]];
     selectedElement.UpdateReverseColours();
 }