Exemplo n.º 1
0
        public override void Update()
        {
            if (!Owner._Object.AmOwner)
            {
                return;
            }

            if (!HudManager.Instance)
            {
                return;
            }

            if (Owner._Object.inVent || Owner._Object.Data.IsDead || MeetingHud.Instance ||
                !MindControlButton.isActiveAndEnabled || MindControlButton.isCoolingDown)
            {
                ControlMenu?.CloseMenu();
            }

            DrawButtons();

            if (MindControlledPlayer != null)
            {
                return;
            }

            ControlMenu.Update();
            if (Input.GetMouseButtonDown(1))
            {
                PerformKill(CrucioButton);
            }
        }
Exemplo n.º 2
0
 private void updateButton_Click_1(object sender, EventArgs e)
 {
     if (idText.TextLength == 0 || nameText.TextLength == 0 || priceText.TextLength == 0)
     {
         statusLabel.Text    = "You need filling all blank";
         statusLabel.Visible = true;
     }
     else
     {
         try
         {
             cm.Update(idText.Text, nameText.Text, int.Parse(priceText.Text), oldID);
             ManageMenu_Load(sender, e);
             statusLabel.Visible = false;
         }
         catch
         {
             statusLabel.Text    = "ID already exist";
             statusLabel.Visible = true;
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        ///
        /// Select - Layer5 added by Matthew Baldock
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            //Allows game to exit.
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
                Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }


            //particleEngine.EmitterLocation = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);
            particleEngine.Update(gameTime);

            //Update the current state
            switch (currentGameState)
            {
            case GameState.Login:
                login_menu.Update(gameTime);
                break;

            case GameState.MainMenu:
                main_menu.Update(gameTime);
                break;

            case GameState.Multiplayer:
                multiplayer_menu.Update(gameTime);
                break;

            case GameState.Options:
                options_menu.Update(gameTime);
                break;

            case GameState.Credits:
                credits_menu.Update(gameTime);
                break;

            case GameState.CreateLobby:
                create_lobby_menu.Update(gameTime);
                break;

            case GameState.LobbyBrowser:
                lobby_browser_menu.Update(gameTime);
                break;

            case GameState.Lobby:
                lobby_menu.Update(gameTime);
                break;

            case GameState.Playing:
                gameplayScreen.Update(gameTime);
                break;

            case GameState.Select:
                shipselectionScreen.update();
                break;

            case GameState.ControlMenu:
                control_menu.Update(gameTime);
                break;

            default:
                break;
            }

            base.Update(gameTime);
        }