Josh Engebretson 10 years ago
parent
commit
d38fdb0692
2 changed files with 27 additions and 16 deletions
  1. 17 1
      Build/AtomicSharp/AtomicEngine.cs
  2. 10 15
      Build/AtomicSharp/AtomicSharpTest/Program.cs

+ 17 - 1
Build/AtomicSharp/AtomicEngine.cs

@@ -17,7 +17,23 @@ namespace AtomicEngine
 
 		[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
 		private static extern IntPtr csb_AtomicEngine_GetSubsystem(string name);
-					
+			
+
+		static Atomic()
+		{
+			Initialize ();
+		}
+
+		public static void Run()
+		{
+			
+			while (Atomic.RunFrame ()) {
+
+
+			}
+
+		}
+
 		public static bool RunFrame()
 		{
 			GC.Collect();

+ 10 - 15
Build/AtomicSharp/AtomicSharpTest/Program.cs

@@ -1,23 +1,18 @@
-using System;
+
 using AtomicEngine;
 using AtomicPlayer;
 
-namespace AtomicSharpTest
-{
-	class MainClass
-	{				
-		public static void Main (string[] args)
-		{
-			Atomic.Initialize ();
+class MyGame
+{				
+	public static void Main (string[] args)
+	{
+		var player = Atomic.GetSubsystem<Player> ();
 
-			var player = Atomic.GetSubsystem<Player> ();
+		player.LoadScene ("Scenes/Scene.scene");		
 
-			player.LoadScene ("Scenes/Scene.scene", null);		
+		Atomic.Run ();
 
-			while (Atomic.RunFrame ()) {
-						
-				
-			}
-		}
 	}
 }
+
+