Browse Source

Cards now runs on Android, but unable to test touches.

Dominique Louis 14 years ago
parent
commit
cf94c15cba
1 changed files with 11 additions and 11 deletions
  1. 11 11
      StarterKits/MacOS/Cards/CardsGame/ScreenManager/InputState.cs

+ 11 - 11
StarterKits/MacOS/Cards/CardsGame/ScreenManager/InputState.cs

@@ -25,9 +25,8 @@ namespace GameStateManagement
     public class InputState
     {
         #region Fields
-
-        public const int MaxInputs = 4;
-
+		public const int MaxInputs = 4;	
+		
         public readonly KeyboardState[] CurrentKeyboardStates;
         public readonly GamePadState[] CurrentGamePadStates;
 
@@ -72,6 +71,15 @@ namespace GameStateManagement
         /// </summary>
         public void Update()
         {
+#if WINDOWS_PHONE || IOS || ANDROID
+            TouchState = TouchPanel.GetState();
+
+            Gestures.Clear();
+            while (TouchPanel.IsGestureAvailable)
+            {
+                Gestures.Add(TouchPanel.ReadGesture());
+            }
+#else
             for (int i = 0; i < MaxInputs; i++)
             {
                 LastKeyboardStates[i] = CurrentKeyboardStates[i];
@@ -87,14 +95,6 @@ namespace GameStateManagement
                     GamePadWasConnected[i] = true;
                 }
             }
-#if WINDOWS_PHONE || IOS || ANDROID
-            TouchState = TouchPanel.GetState();
-
-            Gestures.Clear();
-            while (TouchPanel.IsGestureAvailable)
-            {
-                Gestures.Add(TouchPanel.ReadGesture());
-            }
 #endif
         }