diff --git a/AndroidDemos/Activity1.cs b/AndroidDemos/Activity1.cs new file mode 100644 index 0000000..8b470b6 --- /dev/null +++ b/AndroidDemos/Activity1.cs @@ -0,0 +1,26 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; +using Android.Views; +using Demos; + +namespace AndroidDemos { + [Activity(Label = "Demos.Android" + , MainLauncher = true + , Icon = "@drawable/icon" + , Theme = "@style/Theme.Splash" + , AlwaysRetainTaskState = true + , LaunchMode = LaunchMode.SingleInstance + , ScreenOrientation = ScreenOrientation.SensorLandscape + , ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)] + public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity { + + protected override void OnCreate(Bundle bundle) { + base.OnCreate(bundle); + var g = new GameImpl(); + this.SetContentView((View) g.Services.GetService(typeof(View))); + g.Run(); + } + + } +} \ No newline at end of file diff --git a/AndroidDemos/Demos.Android.csproj b/AndroidDemos/Demos.Android.csproj new file mode 100644 index 0000000..29215a7 --- /dev/null +++ b/AndroidDemos/Demos.Android.csproj @@ -0,0 +1,116 @@ + + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {410C0262-131C-4D0E-910D-D01B4F7143E0} + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + Properties + AndroidDemos + AndroidDemos + 512 + true + Resources\Resource.Designer.cs + Off + armeabi-v7a;x86 + .m4a + + v7.1 + Android + Properties\AndroidManifest.xml + True + + + true + full + false + bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\ + DEBUG;TRACE;ANDROID + prompt + 4 + True + None + + + pdbonly + true + bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\ + TRACE;ANDROID + prompt + 4 + False + SdkOnly + + + + ..\packages\Coroutine.1.0.1\lib\netstandard2.0\Coroutine.dll + True + + + + ..\packages\MonoGame.Extended.3.7.0\lib\netstandard2.0\MonoGame.Extended.dll + True + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll + True + + + + + + + $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Android\MonoGame.Framework.dll + + + + + + + + + + + + + + + + + + + + + + + + + + {1bc4682b-aa14-4937-b5c7-707e20fe88ff} + Demos + + + {232a6513-a28c-4d7f-ba5a-89281bfc1538} + MLEM.Extended + + + {997f4739-7bec-4621-b9ca-68deb2d74412} + MLEM.Startup + + + {6f00629a-8b87-4264-8896-19983285e32f} + MLEM.Ui + + + {1d6ab762-43c4-4775-8924-707c7ec3f142} + MLEM + + + + + \ No newline at end of file diff --git a/AndroidDemos/Properties/AndroidManifest.xml b/AndroidDemos/Properties/AndroidManifest.xml new file mode 100644 index 0000000..4dbed57 --- /dev/null +++ b/AndroidDemos/Properties/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/AndroidDemos/Properties/AssemblyInfo.cs b/AndroidDemos/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..aecac0d --- /dev/null +++ b/AndroidDemos/Properties/AssemblyInfo.cs @@ -0,0 +1,41 @@ +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("Demos.Android")] +[assembly: AssemblyProduct("Demos.Android")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6f377592-2266-4c47-855e-6260ff75e1f4")] + +// 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")] + +// Add some common permissions, these can be removed if not needed +[assembly: UsesPermission(Android.Manifest.Permission.Internet)] +[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] \ No newline at end of file diff --git a/AndroidDemos/Resources/Drawable/Icon.png b/AndroidDemos/Resources/Drawable/Icon.png new file mode 100644 index 0000000..f6f4f41 Binary files /dev/null and b/AndroidDemos/Resources/Drawable/Icon.png differ diff --git a/AndroidDemos/Resources/Drawable/Splash.png b/AndroidDemos/Resources/Drawable/Splash.png new file mode 100644 index 0000000..2f86107 Binary files /dev/null and b/AndroidDemos/Resources/Drawable/Splash.png differ diff --git a/AndroidDemos/Resources/Resource.Designer.cs b/AndroidDemos/Resources/Resource.Designer.cs new file mode 100644 index 0000000..b79b7ac --- /dev/null +++ b/AndroidDemos/Resources/Resource.Designer.cs @@ -0,0 +1,99 @@ +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +[assembly: global::Android.Runtime.ResourceDesignerAttribute("AndroidDemos.Resource", IsApplication=true)] + +namespace AndroidDemos +{ + + + [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; + + // aapt resource value: 0x7f020001 + public const int Splash = 2130837505; + + 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 Hello = 2130903040; + + static String() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private String() + { + } + } + + public partial class Style + { + + // aapt resource value: 0x7f040000 + public const int Theme_Splash = 2130968576; + + static Style() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Style() + { + } + } + } +} +#pragma warning restore 1591 diff --git a/AndroidDemos/Resources/Values/Strings.xml b/AndroidDemos/Resources/Values/Strings.xml new file mode 100644 index 0000000..540633f --- /dev/null +++ b/AndroidDemos/Resources/Values/Strings.xml @@ -0,0 +1,5 @@ + + + Hello World, Click Me! + Demos.Android + diff --git a/AndroidDemos/Resources/Values/Styles.xml b/AndroidDemos/Resources/Values/Styles.xml new file mode 100644 index 0000000..5102134 --- /dev/null +++ b/AndroidDemos/Resources/Values/Styles.xml @@ -0,0 +1,7 @@ + + + + diff --git a/AndroidDemos/packages.config b/AndroidDemos/packages.config new file mode 100644 index 0000000..003ddcd --- /dev/null +++ b/AndroidDemos/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Demos.DesktopGL/Demos.DesktopGL.csproj b/Demos.DesktopGL/Demos.DesktopGL.csproj new file mode 100644 index 0000000..99b189c --- /dev/null +++ b/Demos.DesktopGL/Demos.DesktopGL.csproj @@ -0,0 +1,26 @@ + + + + Exe + net462 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Demos.DesktopGL/Program.cs b/Demos.DesktopGL/Program.cs new file mode 100644 index 0000000..379d31e --- /dev/null +++ b/Demos.DesktopGL/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace Demos.DesktopGL { + public static class Program { + + public static void Main() { + using (var game = new GameImpl()) + game.Run(); + } + + } +} \ No newline at end of file