コード例 #1
0
 /// <summary>
 /// Handle moving the current selection to the foundation pile.
 /// </summary>
 private void HandleMoveToFoundationPile()
 {
     // If we double click on a card, try to put it on the foundation pile.
     if (DoubleClickHelper.HasDoubleClicked(MouseButton.Left) && foundationPiles.Any(pile => TryMoveCard(pile, true)))
     {
         CurrentSelection = null;
     }
 }
コード例 #2
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // We NEED to update input before we execute game logic
            // so that the gameplay does not lag by a frame (due to not synchronized input).
            Input.Update();
            DoubleClickHelper.Update(gameTime);

            GameScreenManager.Update(gameTime);
        }