Browse Source

Fix up the samples to run

Kenneth Pouncey 13 years ago
parent
commit
3e578b770e

+ 4 - 4
Samples/MacOS/CollisionSample/Program.cs

@@ -46,12 +46,12 @@ namespace CollisionSample
 	
 	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
 	{
-		
+		CollisionSample game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (CollisionSample game = new CollisionSample()) {
-				game.Run ();
-			}
+			game = new CollisionSample();
+			game.Run ();
+
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)

+ 4 - 4
Samples/MacOS/PerPixelCollisionSample/Program.cs

@@ -36,12 +36,12 @@ namespace PerPixelCollision
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		PerPixelCollisionGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (PerPixelCollisionGame game = new PerPixelCollisionGame()) {
-				game.Run ();
-			}
+			game = new PerPixelCollisionGame();
+			game.Run ();
+
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 4 - 4
Samples/MacOS/RenderTarget2DSample/Program.cs

@@ -24,12 +24,12 @@ namespace RenderTarget2DSample
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1 ()) {
-				game.Run ();
-			}
+			game = new Game1 ();
+			game.Run ();
+
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
StarterKits/MacOS/Marblets/Program.cs

@@ -23,12 +23,11 @@ namespace Marblets
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		MarbletsGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (MarbletsGame game = new MarbletsGame ()) {
-				game.Run ();
-			}
+			game = new MarbletsGame ();
+			game.Run ();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 3
StarterKits/MacOS/Platformer/Program.cs

@@ -18,11 +18,11 @@ namespace Platformer
 	
 	class AppDelegate : NSApplicationDelegate
 	{
+		PlatformerGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{			
-			using (PlatformerGame game = new PlatformerGame()) {
-				game.Run ();
-			}
+			game = new PlatformerGame();
+			game.Run ();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)