Kaynağa Gözat

make Program.cs files linux compatible

Edward Rudd 13 yıl önce
ebeveyn
işleme
e1d43fc28c

+ 6 - 2
BookSourceCode/XNAGameDevelopmentbyExampleCode/AsteroidBeltAssault/Program.cs

@@ -1,12 +1,14 @@
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#endif
 
 
 namespace Asteroid_Belt_Assault
 namespace Asteroid_Belt_Assault
 {
 {
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
     static class Program
     static class Program
     {
     {
         /// <summary>
         /// <summary>
@@ -20,7 +22,7 @@ namespace Asteroid_Belt_Assault
             }
             }
         }
         }
     }
     }
-#else
+#elif MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -51,6 +53,8 @@ namespace Asteroid_Belt_Assault
 			return true;
 			return true;
 		}
 		}
 	}		
 	}		
+#else
+#error Unknown platform
 #endif
 #endif
 }
 }
 
 

+ 6 - 2
BookSourceCode/XNAGameDevelopmentbyExampleCode/FloodControl/Program.cs

@@ -1,12 +1,14 @@
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#endif
 
 
 namespace Flood_Control
 namespace Flood_Control
 {
 {
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
 	static class Program
 	static class Program
 	{
 	{
 	/// <summary>
 	/// <summary>
@@ -20,7 +22,7 @@ namespace Flood_Control
 		}
 		}
 	}
 	}
 	}
 	}
-#else
+#elif MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -51,6 +53,8 @@ namespace Flood_Control
 			return true;
 			return true;
 		}
 		}
 	}		
 	}		
+#else
+#error Unknown platform
 #endif
 #endif
 }
 }
 
 

+ 7 - 3
BookSourceCode/XNAGameDevelopmentbyExampleCode/GemstoneHunter/Program.cs

@@ -1,12 +1,14 @@
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#endif
 
 
 namespace Gemstone_Hunter
 namespace Gemstone_Hunter
 {
 {
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
     static class Program
     static class Program
     {
     {
         /// <summary>
         /// <summary>
@@ -20,7 +22,7 @@ namespace Gemstone_Hunter
             }
             }
         }
         }
     }
     }
-#else
+#elif MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -50,7 +52,9 @@ namespace Gemstone_Hunter
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}			
+	}
+#else
+#error Unknown platform
 #endif
 #endif
 }
 }
 
 

+ 6 - 2
BookSourceCode/XNAGameDevelopmentbyExampleCode/RobotRampage/Program.cs

@@ -1,12 +1,14 @@
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#endif
 
 
 namespace Robot_Rampage
 namespace Robot_Rampage
 {
 {
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
     static class Program
     static class Program
     {
     {
         /// <summary>
         /// <summary>
@@ -20,7 +22,7 @@ namespace Robot_Rampage
             }
             }
         }
         }
     }
     }
-#else
+#elif MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -52,6 +54,8 @@ namespace Robot_Rampage
 			return true;
 			return true;
 		}
 		}
 	}		
 	}		
+#else
+#error Unknown platform
 #endif
 #endif
 }
 }