protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { Communicator.clientShutDown(); Exit(); } UiSystem.Update(gameTime); Communicator.newPlayerMutex.WaitOne(); foreach (Sprite sprite in sprites) { sprite.Update(gameTime); } Communicator.newPlayerMutex.ReleaseMutex(); if (!btnVictory.IsHidden) { vicTimeCount += gameTime.ElapsedGameTime.TotalSeconds; if (vicTimeCount >= 5) { vicTimeCount = 0; btnVictory.IsHidden = true; } } base.Update(gameTime); }
protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } titleUi.Update(gameTime); UiSystem.Update(gameTime); base.Update(gameTime); }