Browse Source

[Card]Fix typo that stopped sample from building.

CartBlanche 2 months ago
parent
commit
edb0e7549b

+ 2 - 2
CardsStarterKit/Core/Game/ScreenManager/MenuEntry.cs

@@ -92,7 +92,7 @@ namespace GameStateManagement
         {
             // there is no such thing as a selected item on Windows Phone, so we always
             // force isSelected to be false
-            if (UIUtilty.IsMobile)
+            if (UIUtility.IsMobile)
             {
                 isSelected = false;
             }
@@ -117,7 +117,7 @@ namespace GameStateManagement
             Color textColor = isSelected ? Color.White : Color.Black;
             Color tintColor = isSelected ? Color.White : Color.Gray;
 
-            if (UIUtilty.IsMobile)
+            if (UIUtility.IsMobile)
             {
                 // there is no such thing as a selected item on Windows Phone, so we always
                 // force isSelected to be false

+ 2 - 2
CardsStarterKit/Core/Game/ScreenManager/MenuScreen.cs

@@ -84,7 +84,7 @@ namespace GameStateManagement
                 OnCancel(player);
             }
 
-            if (UIUtilty.IsDesktop)
+            if (UIUtility.IsDesktop)
             {
                 // Handle keyboard input
                 if (input.IsMenuUp(ControllingPlayer))
@@ -136,7 +136,7 @@ namespace GameStateManagement
                     }
                 }
             }
-            else if (UIUtilty.IsMobile)
+            else if (UIUtility.IsMobile)
             {
                 // Handle touch input
                 foreach (GestureSample gesture in input.Gestures)

+ 1 - 1
CardsStarterKit/Core/Game/Screens/InstructionScreen.cs

@@ -60,7 +60,7 @@ namespace Blackjack
         {
             if (!isExit)
             {
-                if (UIUtilty.IsMobile)
+                if (UIUtility.IsMobile)
                 {
                     if (ScreenManager.InputState.Gestures.Count > 0 &&
                         ScreenManager.InputState.Gestures[0].GestureType == GestureType.Tap)

+ 1 - 1
CardsStarterKit/Framework/Game/CardsGame.cs

@@ -161,7 +161,7 @@ namespace CardsFramework
             // Load all card assets
             for (int cardIndex = 0; cardIndex < 54; cardIndex++)
             {
-                assetName = UIUtilty.GetCardAssetName(fullDeck[cardIndex]);
+                assetName = UIUtility.GetCardAssetName(fullDeck[cardIndex]);
                 LoadUITexture("Cards", assetName);
             }
             // Load card back picture

+ 2 - 2
CardsStarterKit/Framework/ScreenManager/InputState.cs

@@ -92,11 +92,11 @@ namespace CardsFramework
             GamePadWasConnected = new bool[MaxInputs];
 
             // Configure platform-specific input options
-            if (UIUtilty.IsMobile)
+            if (UIUtility.IsMobile)
             {
                 TouchPanel.EnabledGestures = GestureType.Tap;
             }
-            else if (UIUtilty.IsDesktop)
+            else if (UIUtility.IsDesktop)
             {
                 // No desktop-specific initialization needed
             }

+ 2 - 2
CardsStarterKit/Framework/UI/AnimatedCardsGameComponent.cs

@@ -30,7 +30,7 @@ namespace CardsFramework
         /// </summary>
         /// <param name="card">The card associated with the animation component.</param>
         /// <param name="cardGame">The associated game.</param>
-        public AnimatedCardsGameComponent(TraditionalCard card, CardsGame cardGame, SpriteBatch? sharedSpriteBatch = null, Matrix? globalTransformation = null)
+        public AnimatedCardsGameComponent(TraditionalCard card, CardsGame cardGame, SpriteBatch sharedSpriteBatch = null, Matrix? globalTransformation = null)
             : base(cardGame, null, sharedSpriteBatch, globalTransformation)
         {
             Card = card;
@@ -48,7 +48,7 @@ namespace CardsFramework
 
 
             CurrentFrame = IsFaceDown ? CardGame.cardsAssets["CardBack_" + CardGame.Theme] :
-                CardGame.cardsAssets[UIUtilty.GetCardAssetName(Card)];
+                CardGame.cardsAssets[UIUtility.GetCardAssetName(Card)];
         }
 
         /// <summary>

+ 1 - 1
CardsStarterKit/Framework/UI/AnimatedGameComponent.cs

@@ -49,7 +49,7 @@ namespace CardsFramework
         /// <param name="cardGame">The associated card game.</param>
         /// <param name="currentFrame">The texture serving as the current frame
         /// to display as the component.</param>
-        public AnimatedGameComponent(CardsGame cardGame, Texture2D? currentFrame, SpriteBatch sharedSpriteBatch, Matrix? globalTransformation = null)
+        public AnimatedGameComponent(CardsGame cardGame, Texture2D currentFrame, SpriteBatch sharedSpriteBatch, Matrix? globalTransformation = null)
             : base(cardGame.Game)
         {
             if (sharedSpriteBatch == null)