소스 검색

Got Aiming and Chase and Evade samples working for PSM.

Dominique Louis 12 년 전
부모
커밋
cb466bd8e5
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      Aiming/AimingGame.cs
  2. 1 1
      ChaseAndEvade/ChaseAndEvade.PSMobile.csproj
  3. 3 3
      ChaseAndEvade/ChaseAndEvadeGame.cs

+ 1 - 1
Aiming/AimingGame.cs

@@ -320,7 +320,7 @@ namespace Aiming
             //Move toward the touch point. We slow down the cat when it gets within a distance of CatSpeed to the touch point.
             float smoothStop = 1;
 			
-			if (currentTouchState != null )
+			//if (currentTouchState != null )
             {
 				if (currentTouchState.Count > 0)
 	            {

+ 1 - 1
ChaseAndEvade/ChaseAndEvade.PSMobile.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
+    <DefineConstants>DEBUG;PSM</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>

+ 3 - 3
ChaseAndEvade/ChaseAndEvadeGame.cs

@@ -619,7 +619,7 @@ namespace ChaseAndEvade
 			MouseState currentMouseState = Mouse.GetState ();
 #endif
 			
-#if IPHONE
+#if IPHONE || PSM
 			GamePadState currentGamePadState = GamePad.GetState (PlayerIndex.One);
 
 			// Check for exit.
@@ -642,7 +642,7 @@ namespace ChaseAndEvade
 			//Move toward the touch point. We slow down the cat when it gets within a distance of MaxCatSpeed to the touch point.
 			float smoothStop = 1;			
 			
-#if IPHONE			
+#if IPHONE || PSM		
 			// check to see if the user wants to move the cat. we'll create a vector
 			// called catMovement, which will store the sum of all the user's inputs.
 			catMovement = currentGamePadState.ThumbSticks.Left;
@@ -670,7 +670,7 @@ namespace ChaseAndEvade
 			
 			TouchCollection currentTouchCollection = TouchPanel.GetState();
 			
-			if (currentTouchCollection != null )
+			// TODO if (currentTouchCollection != null )
             {
 				if (currentTouchCollection.Count > 0)
 	            {