예제 #1
0
        /// <summary>
        /// Check for user input and run any other updates.
        /// </summary>
        public override void Update()
        {
            // Check for join attempt
            // Update both the address textbox and the join button
            // Using '|' is the following line is correct (not a typo)
            if (_address.Update() | _join.Update())
            {
                Current = new LobbyMenu(_address.Text);
            }

            // Check if going back to main menu
            if (_back.Update())
            {
                Current = new MainMenu();
            }
        }
예제 #2
0
        /// <summary>
        /// Check for user input and run any other updates.
        /// </summary>
        public override void Update()
        {
            // Check if hosting a game
            if (_host.Update())
            {
                Current = new LobbyMenu(null);
            }

            // Check if joining a game
            if (_join.Update())
            {
                Current = new JoinMenu();
            }

            // Check if program should close
            if (_exit.Update())
            {
                GameMain.Shutdown = true;
            }
        }