Browse Source

Updating AtomicMutant

Josh Engebretson 9 years ago
parent
commit
761af442b3

+ 1 - 1
AtomicNET/AtomicMutant/.gitignore

@@ -2,4 +2,4 @@ UserPrefs.json
 BuildSettings.json
 Cache/*
 AtomicNET/*
-Resources/AtomicProject.*
+Resources/AtomicMutant.*

+ 62 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/MainActivity.cs

@@ -0,0 +1,62 @@
+using Android.App;
+using Android.Content.PM;
+using Android.Widget;
+using Android.OS;
+using Android.Views;
+using AtomicEngine;
+
+namespace AtomicPlayer
+{
+	[Activity(Label = "AtomicPlayer", MainLauncher = true,
+		Icon = "@drawable/icon", Theme = "@android:style/Theme.NoTitleBar.Fullscreen",
+		ConfigurationChanges = ConfigChanges.KeyboardHidden | ConfigChanges.Orientation,
+		ScreenOrientation = ScreenOrientation.Landscape)]
+	public class MainActivity : Activity
+	{
+		protected override void OnCreate(Bundle bundle)
+		{
+			base.OnCreate(bundle);
+			var mLayout = new AbsoluteLayout(this);
+            var surface = AndroidSDLSurface.CreateSurface(this, false, typeof(AtomicMain));
+			mLayout.AddView(surface);
+			SetContentView(mLayout);
+		}
+
+		protected override void OnResume()
+		{
+            AndroidSDLSurface.OnResume();
+			base.OnResume();
+		}
+
+		protected override void OnPause()
+		{
+            AndroidSDLSurface.OnPause();
+			base.OnPause();
+		}
+
+		public override void OnLowMemory()
+		{
+            AndroidSDLSurface.OnLowMemory();
+			base.OnLowMemory();
+		}
+
+		protected override void OnDestroy()
+		{
+            AndroidSDLSurface.OnDestroy();
+			base.OnDestroy();
+		}
+
+		public override bool DispatchKeyEvent(KeyEvent e)
+		{
+			if (!AndroidSDLSurface.DispatchKeyEvent(e))
+				return false;
+			return base.DispatchKeyEvent(e);
+		}
+
+		public override void OnWindowFocusChanged(bool hasFocus)
+		{
+            AndroidSDLSurface.OnWindowFocusChanged(hasFocus);
+			base.OnWindowFocusChanged(hasFocus);
+		}
+	}
+}

+ 5 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/Properties/AndroidManifest.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="AtomicMutant.AtomicMutant" android:versionCode="1" android:versionName="1.0">
+	<uses-sdk android:minSdkVersion="16" />
+	<application android:label="AtomicMutant"></application>
+</manifest>

+ 30 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/Properties/AssemblyInfo.cs

@@ -0,0 +1,30 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("AtomicMutant")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("AtomicMutant")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 80 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/Resources/Resource.Designer.cs

@@ -0,0 +1,80 @@
+#pragma warning disable 1591
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: global::Android.Runtime.ResourceDesignerAttribute("Application.Resource", IsApplication=true)]
+
+namespace Application
+{
+	
+	
+	[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+	public partial class Resource
+	{
+		
+		static Resource()
+		{
+			global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+		}
+		
+		public static void UpdateIdValues()
+		{
+		}
+		
+		public partial class Attribute
+		{
+			
+			static Attribute()
+			{
+				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+			}
+			
+			private Attribute()
+			{
+			}
+		}
+		
+		public partial class Drawable
+		{
+			
+			// aapt resource value: 0x7f020000
+			public const int icon = 2130837504;
+			
+			static Drawable()
+			{
+				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+			}
+			
+			private Drawable()
+			{
+			}
+		}
+		
+		public partial class String
+		{
+			
+			// aapt resource value: 0x7f030001
+			public const int ApplicationName = 2130903041;
+			
+			// aapt resource value: 0x7f030000
+			public const int app_name = 2130903040;
+			
+			static String()
+			{
+				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+			}
+			
+			private String()
+			{
+			}
+		}
+	}
+}
+#pragma warning restore 1591

BIN
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/Resources/drawable/icon.png


+ 4 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Android/Resources/values/Strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="ApplicationName">AtomicMutant</string>
+</resources>

+ 18 - 0
AtomicNET/AtomicMutant/Project/AtomicNET/Platforms/Desktop/Program.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Linq;
+
+using AtomicEngine;
+
+
+namespace AtomicPlayer
+{
+    public class Program
+    {        
+        public static void Main(string[] args)
+        {
+            Application.Run<AtomicMain>(args);
+        }
+    }
+}

+ 3 - 3
AtomicNET/AtomicMutant/Resources/Scenes/Scene.scene

@@ -5,8 +5,8 @@
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Elapsed Time" value="0" />
-	<attribute name="Next Replicated Node ID" value="479" />
-	<attribute name="Next Replicated Component ID" value="3035" />
+	<attribute name="Next Replicated Node ID" value="480" />
+	<attribute name="Next Replicated Component ID" value="3099" />
 	<attribute name="Next Local Node ID" value="16778496" />
 	<attribute name="Next Local Component ID" value="16777216" />
 	<attribute name="Variables" />
@@ -363,7 +363,7 @@
 		<attribute name="Scale" value="1 1 1" />
 		<attribute name="Variables" />
 		<component type="CSComponent" id="2970">
-			<attribute name="Assembly" value="CSComponentAssembly;AtomicProject.dll" />
+			<attribute name="Assembly" value="CSComponentAssembly;AtomicMutant.dll" />
 			<attribute name="Class" value="CharacterExample" />
 		</component>
 	</node>

+ 1 - 1
AtomicNET/AtomicMutant/Resources/Scenes/Scene.scene.asset

@@ -2,7 +2,7 @@
 	"version": 1,
 	"guid": "627532ce83065783581852967b660c15",
 	"SceneImporter": {
-		"sceneCamRotation": "0.25771 0.0380556 0.955115 -0.14104",
+		"sceneCamRotation": "0.25771 0.0380555 0.955115 -0.14104",
 		"sceneCamPosition": "-14.5019 4.72938 27.0545"
 	}
 }

+ 11 - 0
AtomicNET/AtomicMutant/Resources/Scripts/AtomicMain.cs

@@ -0,0 +1,11 @@
+using AtomicEngine;
+using AtomicPlayer;
+
+public class AtomicMain : AppDelegate
+{
+    public override void Start()
+    {
+        AtomicNET.GetSubsystem<Player>().LoadScene("Scenes/Scene.scene");
+    }
+
+}

+ 0 - 0
AtomicNET/AtomicMutant/Resources/Scripts/Program.cs.asset → AtomicNET/AtomicMutant/Resources/Scripts/AtomicMain.cs.asset


+ 0 - 14
AtomicNET/AtomicMutant/Resources/Scripts/Program.cs

@@ -1,14 +0,0 @@
-using AtomicEngine;
-using AtomicPlayer;
-
-public static class AtomicMain
-{
-    /// <summary>
-    /// The main entry point for the application.
-    /// </summary>
-    static void Main(string[] args)
-    {        
-        var scene = AtomicNET.GetSubsystem<Player>().LoadScene("Scenes/Scene.scene");
-    }
-
-}

+ 4 - 0
AtomicNET/AtomicMutant/Settings/Project.json

@@ -0,0 +1,4 @@
+{
+    "name" : "AtomicMutant",
+    "platforms": ["desktop"]
+}