Browse Source

Merge branch 'master' of github.com:CartBlanche/MonoGame-Samples

Kenneth Pouncey 13 years ago
parent
commit
5d0a37e6c4

+ 32 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Activity1.cs

@@ -0,0 +1,32 @@
+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+using Microsoft.Xna.Framework;
+using Android.Content.PM;
+
+namespace CatapultWars
+{
+	[Activity (Label = "MonoGame.Samples.CatapultWars"
+	           , MainLauncher = true
+	           ,ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.Keyboard|ConfigChanges.KeyboardHidden)]
+	public class Activity1 : AndroidGameActivity
+	{
+		protected override void OnCreate (Bundle bundle)
+		{
+			base.OnCreate (bundle);
+			
+			CatapultGame.CatapultGame.Activity = this;
+			var g = new CatapultGame.CatapultGame();
+			SetContentView(g.Window);
+			g.Run();
+			
+		}		
+	}
+}
+
+

+ 19 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Assets/AboutAssets.txt

@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+	protected override void OnCreate (Bundle bundle)
+	{
+		base.OnCreate (bundle);
+
+		InputStream input = Assets.Open ("my_asset.txt");
+	}
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

+ 290 - 0
Samples/Android/MonoGame.Samples.CatapultWars/MonoGame.Samples.CatapultWars.csproj

@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{289A3AF8-E006-47EF-B34C-CA01020E1655}</ProjectGuid>
+    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <RootNamespace>MonoGame.Samples.CatapultWars</RootNamespace>
+    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+    <AndroidResgenClass>Resource</AndroidResgenClass>
+    <AndroidApplication>True</AndroidApplication>
+    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+    <AssemblyName>MonoGame.Samples.CatapultWars</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <AndroidLinkMode>None</AndroidLinkMode>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+    <ConsolePause>false</ConsolePause>
+    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="Mono.Android" />
+    <Reference Include="OpenTK" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Activity1.cs" />
+    <Compile Include="Resources\Resource.designer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\..\MacOS\CatapaultWars\CatapultGame.cs">
+      <Link>CatapultGame.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Catapult\Catapult.cs">
+      <Link>Catapult\Catapult.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Catapult\Projectile.cs">
+      <Link>Catapult\Projectile.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Players\AI.cs">
+      <Link>Players\AI.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Players\Human.cs">
+      <Link>Players\Human.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Players\Player.cs">
+      <Link>Players\Player.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\GameScreen.cs">
+      <Link>ScreenManager\GameScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\InputState.cs">
+      <Link>ScreenManager\InputState.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\MenuEntry.cs">
+      <Link>ScreenManager\MenuEntry.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\MenuScreen.cs">
+      <Link>ScreenManager\MenuScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\MouseGestureType.cs">
+      <Link>ScreenManager\MouseGestureType.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\PlayerIndexEventArgs.cs">
+      <Link>ScreenManager\PlayerIndexEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\ScreenManager\ScreenManager.cs">
+      <Link>ScreenManager\ScreenManager.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Screens\BackgroundScreen.cs">
+      <Link>Screens\BackgroundScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Screens\GameplayScreen.cs">
+      <Link>Screens\GameplayScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Screens\InstructionsScreen.cs">
+      <Link>Screens\InstructionsScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Screens\MainMenuScreen.cs">
+      <Link>Screens\MainMenuScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Screens\PauseScreen.cs">
+      <Link>Screens\PauseScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Utility\Animation.cs">
+      <Link>Utility\Animation.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapaultWars\Utility\AudioManager.cs">
+      <Link>Utility\AudioManager.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\AboutResources.txt" />
+    <None Include="Assets\AboutAssets.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidResource Include="Resources\layout\Main.axml" />
+    <AndroidResource Include="Resources\values\Strings.xml" />
+    <AndroidResource Include="Resources\drawable\Icon.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Android.csproj">
+      <Project>{565129E0-4EE5-4F6F-B403-C3484C9740BE}</Project>
+      <Name>Lidgren.Network.Android</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Android.csproj">
+      <Project>{BA9476CF-99BA-4D03-92F2-73D2C5E58883}</Project>
+      <Name>MonoGame.Framework.Android</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Assets\Content\" />
+    <Folder Include="Catapult\" />
+    <Folder Include="Players\" />
+    <Folder Include="ScreenManager\" />
+    <Folder Include="Screens\" />
+    <Folder Include="Utility\" />
+    <Folder Include="Assets\Content\Fonts\" />
+    <Folder Include="Assets\Content\Sounds\" />
+    <Folder Include="Assets\Content\Textures\" />
+    <Folder Include="Assets\Content\Textures\Ammo\" />
+    <Folder Include="Assets\Content\Textures\Backgrounds\" />
+    <Folder Include="Assets\Content\Textures\Catapults\" />
+    <Folder Include="Assets\Content\Textures\HUD\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Blue\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Fire_Miss\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Hit_Smoke\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Red\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Blue\blueDestroyed\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Blue\blueFire\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Blue\blueIdle\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Blue\bluePullback\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Red\redDestroyed\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Red\redFire\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Red\redIdle\" />
+    <Folder Include="Assets\Content\Textures\Catapults\Red\redPullback\" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Fonts\HUDFont.xnb">
+      <Link>Assets\Content\Fonts\HUDFont.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Fonts\MenuFont.xnb">
+      <Link>Assets\Content\Fonts\MenuFont.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\BoulderHit.xnb">
+      <Link>Assets\Content\Sounds\BoulderHit.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\CatapultExplosion.xnb">
+      <Link>Assets\Content\Sounds\CatapultExplosion.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\CatapultFire.xnb">
+      <Link>Assets\Content\Sounds\CatapultFire.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\Lose.xnb">
+      <Link>Assets\Content\Sounds\Lose.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\RopeStretch.xnb">
+      <Link>Assets\Content\Sounds\RopeStretch.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\Win.xnb">
+      <Link>Assets\Content\Sounds\Win.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Ammo\rock_ammo.xnb">
+      <Link>Assets\Content\Textures\Ammo\rock_ammo.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\blank.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\blank.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\cloud1.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\cloud1.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\cloud2.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\cloud2.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\defeat.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\defeat.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\gameplay_screen.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\gameplay_screen.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\instructions.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\instructions.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\mountain.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\mountain.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\sky.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\sky.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\title_screen.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\title_screen.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Backgrounds\victory.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\victory.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\HUD\ammoType.xnb">
+      <Link>Assets\Content\Textures\HUD\ammoType.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\HUD\Arrow.xnb">
+      <Link>Assets\Content\Textures\HUD\Arrow.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\HUD\hudBackground.xnb">
+      <Link>Assets\Content\Textures\HUD\hudBackground.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\HUD\windArrow.xnb">
+      <Link>Assets\Content\Textures\HUD\windArrow.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\AnimationsDef.xml">
+      <Link>Assets\Content\Textures\Catapults\AnimationsDef.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Blue\blueDestroyed\blueCatapult_destroyed.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueDestroyed\blueCatapult_destroyed.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Blue\blueFire\blueCatapult_fire.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueFire\blueCatapult_fire.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Blue\blueIdle\blueIdle.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueIdle\blueIdle.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Blue\bluePullback\blueCatapult_Pullback.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\bluePullback\blueCatapult_Pullback.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Red\redDestroyed\redCatapult_destroyed.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redDestroyed\redCatapult_destroyed.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Red\redFire\redCatapult_fire.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redFire\redCatapult_fire.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Red\redIdle\redIdle.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redIdle\redIdle.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Textures\Catapults\Red\redPullback\redCatapult_Pullback.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redPullback\redCatapult_Pullback.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </AndroidAsset>
+  </ItemGroup>
+</Project>

+ 28 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Properties/AssemblyInfo.cs

@@ -0,0 +1,28 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Android.App;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("MonoGame.Samples.CatapultWars")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("technomage")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.0")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

+ 44 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Resources/AboutResources.txt

@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included 
+in your application as resource files.  Various Android APIs are designed to 
+operate on the resource IDs instead of dealing with images, strings or binary blobs 
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+    drawable/
+        icon.png
+
+    layout/
+        main.axml
+
+    values/
+        strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource".  The native Android APIs do not operate directly with filenames, but 
+instead operate on resource IDs.  When you compile an Android application that uses resources, 
+the build system will package the resources for distribution and generate a class called "R" 
+(this is an Android convention) that contains the tokens for each one of the resources 
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+    public class drawable {
+        public const int icon = 0x123;
+    }
+
+    public class layout {
+        public const int main = 0x456;
+    }
+
+    public class strings {
+        public const int first_string = 0xabc;
+        public const int second_string = 0xbcd;
+    }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 
+to reference the layout/main.axml file, or R.strings.first_string to reference the first 
+string in the dictionary file values/strings.xml.

+ 59 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Resources/Resource.designer.cs

@@ -0,0 +1,59 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.488
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MonoGame.Samples.CatapultWars
+{
+	
+	
+	public partial class Resource
+	{
+		
+		public partial class Attribute
+		{
+			
+			private Attribute()
+			{
+			}
+		}
+		
+		public partial class Drawable
+		{
+			
+			// aapt resource value: 0x7f020000
+			public const int Icon = 2130837504;
+			
+			private Drawable()
+			{
+			}
+		}
+		
+		public partial class Layout
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Main = 2130903040;
+			
+			private Layout()
+			{
+			}
+		}
+		
+		public partial class String
+		{
+			
+			// aapt resource value: 0x7f040000
+			public const int app_name = 2130968576;
+			
+			private String()
+			{
+			}
+		}
+	}
+}

BIN
Samples/Android/MonoGame.Samples.CatapultWars/Resources/drawable/Icon.png


+ 8 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Resources/layout/Main.axml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+</LinearLayout>
+

+ 4 - 0
Samples/Android/MonoGame.Samples.CatapultWars/Resources/values/Strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+	<string name="app_name">MonoGame.Samples.CatapultWars</string>
+</resources>

+ 8 - 1
Samples/MacOS/CatapaultWars/Screens/InstructionsScreen.cs

@@ -125,8 +125,12 @@ namespace CatapultGame
 		void LoadAssetsWorkerThread ()
 		{
 
+#if MACOS || IOS			
 			// Create an Autorelease Pool or we will leak objects.
 			using (var pool = new NSAutoreleasePool()) {
+#else				
+				
+#endif				
 				// Make sure we invoke this on the Main Thread or OpenGL will throw an error
 #if MACOS
 				MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
@@ -136,8 +140,11 @@ namespace CatapultGame
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 #endif
 					gameplayScreen.LoadAssets ();
+#if MACOS || IOS						
 				});
-			}
+					
+			}				
+#endif				
 
 		}
 #endregion

+ 7 - 1
Samples/MonoGame.Samples.Android.sln

@@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.Primitives
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orientation", "Android\Orientation\Orientation.csproj", "{0A5F2E21-0B29-4627-8F06-28BA442B21F7}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.CatapultWars", "Android\MonoGame.Samples.CatapultWars\MonoGame.Samples.CatapultWars.csproj", "{289A3AF8-E006-47EF-B34C-CA01020E1655}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -39,6 +41,10 @@ Global
 		{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{289A3AF8-E006-47EF-B34C-CA01020E1655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{289A3AF8-E006-47EF-B34C-CA01020E1655}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{289A3AF8-E006-47EF-B34C-CA01020E1655}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{289A3AF8-E006-47EF-B34C-CA01020E1655}.Release|Any CPU.Build.0 = Release|Any CPU
 		{565129E0-4EE5-4F6F-B403-C3484C9740BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{565129E0-4EE5-4F6F-B403-C3484C9740BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{565129E0-4EE5-4F6F-B403-C3484C9740BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -75,7 +81,7 @@ Global
 		{E2B6ED3C-A769-47AF-9605-A7410F194B1C}.Release|Any CPU.Deploy.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Android\MonoGame.Samples.Input\MonoGame.Samples.Input.csproj
+		StartupItem = Android\MonoGame.Samples.CatapultWars\MonoGame.Samples.CatapultWars.csproj
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE