Browse Source

Added Android Version of CatapultNetWars

Dean Ellis 13 years ago
parent
commit
5b4b85420e

+ 30 - 0
Samples/Android/CatapultWarsNet/Activity1.cs

@@ -0,0 +1,30 @@
+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 CatapultWarsNet
+{
+	[Activity (Label = "CatapultWarsNet"
+	           , 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/CatapultWarsNet/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");

+ 333 - 0
Samples/Android/CatapultWarsNet/CatapultNetWars.csproj

@@ -0,0 +1,333 @@
+<?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>{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}</ProjectGuid>
+    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <RootNamespace>CatapultWarsNet</RootNamespace>
+    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+    <AndroidResgenClass>Resource</AndroidResgenClass>
+    <AndroidApplication>True</AndroidApplication>
+    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+    <AssemblyName>CatapultWarsNet</AssemblyName>
+    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;ANDROID</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>
+    <DefineConstants>ANDROID</DefineConstants>
+  </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\CatapultNetWars\CatapultGame.cs">
+      <Link>CatapultGame.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Utility\Animation.cs">
+      <Link>Utility\Animation.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Utility\AudioManager.cs">
+      <Link>Utility\AudioManager.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\BackgroundScreen.cs">
+      <Link>Screens\BackgroundScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\GameplayScreen.cs">
+      <Link>Screens\GameplayScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\InstructionsScreen.cs">
+      <Link>Screens\InstructionsScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\LoadingScreen.cs">
+      <Link>Screens\LoadingScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\MainMenuScreen.cs">
+      <Link>Screens\MainMenuScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\MessageBoxScreen.cs">
+      <Link>Screens\MessageBoxScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Screens\PauseScreen.cs">
+      <Link>Screens\PauseScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\GameScreen.cs">
+      <Link>ScreenManager\GameScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\InputState.cs">
+      <Link>ScreenManager\InputState.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\MenuEntry.cs">
+      <Link>ScreenManager\MenuEntry.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\MenuScreen.cs">
+      <Link>ScreenManager\MenuScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\MouseGestureType.cs">
+      <Link>ScreenManager\MouseGestureType.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\PlayerIndexEventArgs.cs">
+      <Link>ScreenManager\PlayerIndexEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\ScreenManager\ScreenManager.cs">
+      <Link>ScreenManager\ScreenManager.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Players\AI.cs">
+      <Link>Players\AI.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Players\Human.cs">
+      <Link>Players\Human.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Players\Player.cs">
+      <Link>Players\Player.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\AvailableSessionMenuEntry.cs">
+      <Link>Networking\AvailableSessionMenuEntry.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\CreateOrFindSessionScreen.cs">
+      <Link>Networking\CreateOrFindSessionScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\JoinSessionScreen.cs">
+      <Link>Networking\JoinSessionScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\LobbyScreen.cs">
+      <Link>Networking\LobbyScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\NetworkBusyScreen.cs">
+      <Link>Networking\NetworkBusyScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\NetworkErrorScreen.cs">
+      <Link>Networking\NetworkErrorScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\NetworkSessionComponent.cs">
+      <Link>Networking\NetworkSessionComponent.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\OperationCompletedEventArgs.cs">
+      <Link>Networking\OperationCompletedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Networking\ProfileSignInScreen.cs">
+      <Link>Networking\ProfileSignInScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Catapult\Catapult.cs">
+      <Link>Catapult\Catapult.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Catapult\Projectile.cs">
+      <Link>Catapult\Projectile.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\IMessageDisplay.cs">
+      <Link>IMessageDisplay.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\MessageDisplayComponent.cs">
+      <Link>MessageDisplayComponent.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\CatapultNetWars\Resources.Designer.cs">
+      <Link>Resources.Designer.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\AboutResources.txt" />
+    <None Include="Assets\AboutAssets.txt" />
+    <None Include="Properties\AndroidManifest.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidResource Include="Resources\drawable\Icon.png" />
+    <AndroidResource Include="Resources\values\Strings.xml" />
+  </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="Resources\layout\" />
+    <Folder Include="Resources\values\" />
+    <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\HUD\" />
+    <Folder Include="Assets\Content\Textures\Catapults\" />
+    <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\CatapultNetWars\Content\Fonts\HUDFont.xnb">
+      <Link>Assets\Content\Fonts\HUDFont.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Fonts\MenuFont.xnb">
+      <Link>Assets\Content\Fonts\MenuFont.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\BoulderHit.wav">
+      <Link>Assets\Content\Sounds\BoulderHit.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\CatapultExplosion.wav">
+      <Link>Assets\Content\Sounds\CatapultExplosion.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\CatapultFire.wav">
+      <Link>Assets\Content\Sounds\CatapultFire.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\Lose.wav">
+      <Link>Assets\Content\Sounds\Lose.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\RopeStretch.wav">
+      <Link>Assets\Content\Sounds\RopeStretch.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapaultWars\Content\Sounds\Win.wav">
+      <Link>Assets\Content\Sounds\Win.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Ammo\rock_ammo.xnb">
+      <Link>Assets\Content\Textures\Ammo\rock_ammo.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\blank.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\blank.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\cloud1.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\cloud1.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\cloud2.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\cloud2.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\defeat.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\defeat.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\gameplay_screen.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\gameplay_screen.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\instructions.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\instructions.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\mountain.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\mountain.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\sky.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\sky.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\title_screen.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\title_screen.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Backgrounds\victory.xnb">
+      <Link>Assets\Content\Textures\Backgrounds\victory.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\HUD\ammoType.xnb">
+      <Link>Assets\Content\Textures\HUD\ammoType.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\HUD\Arrow.xnb">
+      <Link>Assets\Content\Textures\HUD\Arrow.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\HUD\hudBackground.xnb">
+      <Link>Assets\Content\Textures\HUD\hudBackground.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\HUD\windArrow.xnb">
+      <Link>Assets\Content\Textures\HUD\windArrow.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\AnimationsDef.xml">
+      <Link>Assets\Content\Textures\Catapults\AnimationsDef.xml</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Fire_Miss\fire_miss.xnb">
+      <Link>Assets\Content\Textures\Catapults\Fire_Miss\fire_miss.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Hit_Smoke\smoke.xnb">
+      <Link>Assets\Content\Textures\Catapults\Hit_Smoke\smoke.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Blue\blueDestroyed\blueCatapult_destroyed.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueDestroyed\blueCatapult_destroyed.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Blue\blueFire\blueCatapult_fire.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueFire\blueCatapult_fire.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Blue\blueIdle\blueIdle.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\blueIdle\blueIdle.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Blue\bluePullback\blueCatapult_Pullback.xnb">
+      <Link>Assets\Content\Textures\Catapults\Blue\bluePullback\blueCatapult_Pullback.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Red\redDestroyed\redCatapult_destroyed.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redDestroyed\redCatapult_destroyed.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Red\redFire\redCatapult_fire.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redFire\redCatapult_fire.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Red\redIdle\redIdle.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redIdle\redIdle.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Textures\Catapults\Red\redPullback\redCatapult_Pullback.xnb">
+      <Link>Assets\Content\Textures\Catapults\Red\redPullback\redCatapult_Pullback.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\cat.xnb">
+      <Link>Assets\Content\cat.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\chat_able.xnb">
+      <Link>Assets\Content\chat_able.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\chat_mute.xnb">
+      <Link>Assets\Content\chat_mute.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\chat_ready.xnb">
+      <Link>Assets\Content\chat_ready.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\chat_talking.xnb">
+      <Link>Assets\Content\chat_talking.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\gradient.xnb">
+      <Link>Assets\Content\gradient.xnb</Link>
+    </AndroidAsset>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="..\..\MacOS\CatapultNetWars\Resources.resx">
+      <Link>Resources.resx</Link>
+    </EmbeddedResource>
+  </ItemGroup>
+</Project>

+ 8 - 0
Samples/Android/CatapultWarsNet/Properties/AndroidManifest.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="CatapultNetWars.CatapultNetWars">
+	<application android:label="CatapultNetWars" android:icon="@drawable/icon"></application>
+	<uses-sdk android:minSdkVersion="8" />
+	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+	<uses-permission android:name="android.permission.GET_ACCOUNTS" />
+	<uses-permission android:name="android.permission.INTERNET" />
+</manifest>

+ 28 - 0
Samples/Android/CatapultWarsNet/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("CatapultWarsNet")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("d_ellis")]
+[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/CatapultWarsNet/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.

+ 165 - 0
Samples/Android/CatapultWarsNet/Resources/Resource.designer.cs

@@ -0,0 +1,165 @@
+//------------------------------------------------------------------------------
+// <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 CatapultWarsNet
+{
+	
+	
+	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 String
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Back = 2130903040;
+			
+			// aapt resource value: 0x7f030001
+			public const int ConfirmEndSession = 2130903041;
+			
+			// aapt resource value: 0x7f030002
+			public const int ConfirmExitSample = 2130903042;
+			
+			// aapt resource value: 0x7f030003
+			public const int ConfirmForceStartGame = 2130903043;
+			
+			// aapt resource value: 0x7f030004
+			public const int ConfirmLeaveSession = 2130903044;
+			
+			// aapt resource value: 0x7f030005
+			public const int ConfirmMarketplace = 2130903045;
+			
+			// aapt resource value: 0x7f030006
+			public const int ConfirmQuitGame = 2130903046;
+			
+			// aapt resource value: 0x7f030007
+			public const int CreateSession = 2130903047;
+			
+			// aapt resource value: 0x7f030008
+			public const int EndSession = 2130903048;
+			
+			// aapt resource value: 0x7f030009
+			public const int ErrorDisconnected = 2130903049;
+			
+			// aapt resource value: 0x7f03000a
+			public const int ErrorGamerPrivilege = 2130903050;
+			
+			// aapt resource value: 0x7f03000b
+			public const int ErrorHostEndedSession = 2130903051;
+			
+			// aapt resource value: 0x7f03000c
+			public const int ErrorNetwork = 2130903052;
+			
+			// aapt resource value: 0x7f03000d
+			public const int ErrorNetworkNotAvailable = 2130903053;
+			
+			// aapt resource value: 0x7f03000e
+			public const int ErrorRemovedByHost = 2130903054;
+			
+			// aapt resource value: 0x7f03000f
+			public const int ErrorSessionFull = 2130903055;
+			
+			// aapt resource value: 0x7f030010
+			public const int ErrorSessionNotFound = 2130903056;
+			
+			// aapt resource value: 0x7f030011
+			public const int ErrorSessionNotJoinable = 2130903057;
+			
+			// aapt resource value: 0x7f030012
+			public const int ErrorTrialMode = 2130903058;
+			
+			// aapt resource value: 0x7f030013
+			public const int ErrorUnknown = 2130903059;
+			
+			// aapt resource value: 0x7f030014
+			public const int Exit = 2130903060;
+			
+			// aapt resource value: 0x7f030015
+			public const int FindSessions = 2130903061;
+			
+			// aapt resource value: 0x7f030016
+			public const int HostSuffix = 2130903062;
+			
+			// aapt resource value: 0x7f030017
+			public const int JoinSession = 2130903063;
+			
+			// aapt resource value: 0x7f030018
+			public const int LeaveSession = 2130903064;
+			
+			// aapt resource value: 0x7f030019
+			public const int Loading = 2130903065;
+			
+			// aapt resource value: 0x7f03001a
+			public const int Lobby = 2130903066;
+			
+			// aapt resource value: 0x7f03001b
+			public const int MainMenu = 2130903067;
+			
+			// aapt resource value: 0x7f03001c
+			public const int MessageBoxUsage = 2130903068;
+			
+			// aapt resource value: 0x7f03001d
+			public const int MessageGamerJoined = 2130903069;
+			
+			// aapt resource value: 0x7f03001e
+			public const int MessageGamerLeft = 2130903070;
+			
+			// aapt resource value: 0x7f03001f
+			public const int NetworkBusy = 2130903071;
+			
+			// aapt resource value: 0x7f030020
+			public const int NoSessionsFound = 2130903072;
+			
+			// aapt resource value: 0x7f030021
+			public const int Paused = 2130903073;
+			
+			// aapt resource value: 0x7f030022
+			public const int PlayerMatch = 2130903074;
+			
+			// aapt resource value: 0x7f030023
+			public const int QuitGame = 2130903075;
+			
+			// aapt resource value: 0x7f030024
+			public const int ResumeGame = 2130903076;
+			
+			// aapt resource value: 0x7f030025
+			public const int ReturnToLobby = 2130903077;
+			
+			// aapt resource value: 0x7f030026
+			public const int SinglePlayer = 2130903078;
+			
+			// aapt resource value: 0x7f030027
+			public const int SystemLink = 2130903079;
+			
+			private String()
+			{
+			}
+		}
+	}
+}

BIN
Samples/Android/CatapultWarsNet/Resources/drawable/Icon.png


+ 52 - 0
Samples/Android/CatapultWarsNet/Resources/values/Strings.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<resources>
+	<string name="Back">Back</string>
+	<string name="ConfirmEndSession">Are you sure you want to end this session?</string>
+	<string name="ConfirmExitSample">Are you sure you want to exit this sample?</string>
+	<string name="ConfirmForceStartGame">Are you sure you want to start the game,
+even though not all players are ready?</string>
+<string name="ConfirmLeaveSession">Are you sure you want to leave this session?</string>
+<string name="ConfirmMarketplace">Online gameplay is not available in trial mode.
+Would you like to purchase this game?</string>	
+<string name="ConfirmQuitGame">Are you sure you want to quit this game?	</string>	
+<string name="CreateSession">Create Session</string>
+<string name="EndSession">End Session</string>	
+<string name="ErrorDisconnected">Lost connection to the network session</string>	
+<string name="ErrorGamerPrivilege">You must sign in a suitable gamer profile
+in order to access this functionality</string>	
+<string name="ErrorHostEndedSession">Host ended the session</string>	
+<string name="ErrorNetwork">There was an error while
+accessing the network</string>	
+<string name="ErrorNetworkNotAvailable">Networking is turned
+off or not connected</string>	
+<string name="ErrorRemovedByHost">Host kicked you out of the session</string>		
+<string name="ErrorSessionFull">This session is already full</string>	
+<string name="ErrorSessionNotFound">Session not found. It may have ended,
+or there may be no network connectivity
+between the local machine and session host</string>	
+<string name="ErrorSessionNotJoinable">You must wait for the host to return to
+the lobby before you can join this session</string>	
+<string name="ErrorTrialMode">This functionality is not available in trial mode</string>	
+<string name="ErrorUnknown">An unknown error occurred</string>	
+<string name="Exit">Exit</string>	
+<string name="FindSessions">Find Sessions</string>	
+<string name="HostSuffix"> (host)</string>	
+<string name="JoinSession">Join Session</string>	
+<string name="LeaveSession">Leave Session</string>	
+<string name="Loading">Loading</string>	
+<string name="Lobby">Lobby</string>	
+<string name="MainMenu">Main Menu</string>	
+<string name="MessageBoxUsage">Tap = OK
+Back = Cancel</string>	
+<string name="MessageGamerJoined">{0} joined</string>	
+<string name="MessageGamerLeft">{0} left</string>	
+<string name="NetworkBusy">Networking...</string>	
+<string name="NoSessionsFound">No sessions found</string>	
+<string name="Paused">Paused</string>	
+<string name="PlayerMatch">LIVE</string>	
+<string name="QuitGame">Quit Game</string>	
+<string name="ResumeGame">Resume Game</string>	
+<string name="ReturnToLobby">Return to Lobby</string>	
+<string name="SinglePlayer">Single Player</string>	
+<string name="SystemLink">SystemLink</string>	
+</resources>

+ 11 - 3
Samples/MacOS/CatapultNetWars/Catapult/Catapult.cs

@@ -174,9 +174,17 @@ namespace CatapultGame
             AnimationRunning = false;
             currentState = CatapultState.Idle;
             stallUpdateCycles = 0;
-
-            // Load multiple animations form XML definition
-            XDocument doc = XDocument.Load("Content/Textures/Catapults/AnimationsDef.xml");
+			
+			// Load multiple animations form XML definition
+			XDocument doc = null;
+#if ANDROID
+			using(var stream = Game.Activity.Assets.Open(@"Content/Textures/Catapults/AnimationsDef.xml"))
+			{
+				doc = XDocument.Load(stream);
+			}
+#else			
+            doc = XDocument.Load("Content/Textures/Catapults/AnimationsDef.xml");            
+#endif				            
             XName name = XName.Get("Definition");
             var definitions = doc.Document.Descendants(name);
 

+ 161 - 0
Samples/MacOS/CatapultNetWars/Resources.Designer.cs

@@ -65,7 +65,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string Back {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.Back);
+#else				
                 return ResourceManager.GetString("Back", resourceCulture);
+#endif				
             }
         }
         
@@ -74,7 +78,12 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmEndSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmEndSession);
+#else				
+				
                 return ResourceManager.GetString("ConfirmEndSession", resourceCulture);
+#endif				
             }
         }
         
@@ -83,7 +92,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmExitSample {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmExitSample);
+#else								
                 return ResourceManager.GetString("ConfirmExitSample", resourceCulture);
+#endif				
             }
         }
         
@@ -93,7 +106,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmForceStartGame {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmForceStartGame);
+#else								
                 return ResourceManager.GetString("ConfirmForceStartGame", resourceCulture);
+#endif				
             }
         }
         
@@ -102,7 +119,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmLeaveSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmLeaveSession);
+#else								
                 return ResourceManager.GetString("ConfirmLeaveSession", resourceCulture);
+#endif				
             }
         }
         
@@ -112,7 +133,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmMarketplace {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmMarketplace);
+#else								
                 return ResourceManager.GetString("ConfirmMarketplace", resourceCulture);
+#endif				
             }
         }
         
@@ -121,7 +146,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ConfirmQuitGame {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ConfirmQuitGame);
+#else								
                 return ResourceManager.GetString("ConfirmQuitGame", resourceCulture);
+#endif				
             }
         }
         
@@ -130,7 +159,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string CreateSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.CreateSession);
+#else								
                 return ResourceManager.GetString("CreateSession", resourceCulture);
+#endif				
             }
         }
         
@@ -139,7 +172,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string EndSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.EndSession);
+#else								
                 return ResourceManager.GetString("EndSession", resourceCulture);
+#endif				
             }
         }
         
@@ -148,7 +185,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorDisconnected {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorDisconnected);
+#else								
                 return ResourceManager.GetString("ErrorDisconnected", resourceCulture);
+#endif				
             }
         }
         
@@ -158,7 +199,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorGamerPrivilege {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorGamerPrivilege);
+#else				
                 return ResourceManager.GetString("ErrorGamerPrivilege", resourceCulture);
+#endif				
             }
         }
         
@@ -167,7 +212,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorHostEndedSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorHostEndedSession);
+#else								
                 return ResourceManager.GetString("ErrorHostEndedSession", resourceCulture);
+#endif				
             }
         }
         
@@ -177,7 +226,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorNetwork {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorNetwork);
+#else								
                 return ResourceManager.GetString("ErrorNetwork", resourceCulture);
+#endif				
             }
         }
         
@@ -187,7 +240,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorNetworkNotAvailable {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorNetworkNotAvailable);
+#else								
                 return ResourceManager.GetString("ErrorNetworkNotAvailable", resourceCulture);
+#endif				
             }
         }
         
@@ -196,7 +253,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorRemovedByHost {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorRemovedByHost);
+#else								
                 return ResourceManager.GetString("ErrorRemovedByHost", resourceCulture);
+#endif				
             }
         }
         
@@ -205,7 +266,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorSessionFull {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorSessionFull);
+#else								
                 return ResourceManager.GetString("ErrorSessionFull", resourceCulture);
+#endif				
             }
         }
         
@@ -216,7 +281,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorSessionNotFound {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorSessionNotFound);
+#else								
                 return ResourceManager.GetString("ErrorSessionNotFound", resourceCulture);
+#endif				
             }
         }
         
@@ -226,7 +295,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorSessionNotJoinable {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorSessionNotJoinable);
+#else								
                 return ResourceManager.GetString("ErrorSessionNotJoinable", resourceCulture);
+#endif				
             }
         }
         
@@ -235,7 +308,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorTrialMode {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorTrialMode);
+#else								
                 return ResourceManager.GetString("ErrorTrialMode", resourceCulture);
+#endif				
             }
         }
         
@@ -244,7 +321,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ErrorUnknown {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ErrorUnknown);
+#else								
                 return ResourceManager.GetString("ErrorUnknown", resourceCulture);
+#endif				
             }
         }
         
@@ -253,7 +334,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string Exit {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.Exit);
+#else								
                 return ResourceManager.GetString("Exit", resourceCulture);
+#endif				
             }
         }
         
@@ -262,7 +347,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string FindSessions {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.FindSessions);
+#else								
                 return ResourceManager.GetString("FindSessions", resourceCulture);
+#endif				
             }
         }
         
@@ -271,7 +360,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string HostSuffix {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.HostSuffix);
+#else								
                 return ResourceManager.GetString("HostSuffix", resourceCulture);
+#endif				
             }
         }
         
@@ -280,7 +373,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string JoinSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.JoinSession);
+#else								
                 return ResourceManager.GetString("JoinSession", resourceCulture);
+#endif				
             }
         }
         
@@ -289,7 +386,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string LeaveSession {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.LeaveSession);
+#else								
                 return ResourceManager.GetString("LeaveSession", resourceCulture);
+#endif				
             }
         }
         
@@ -298,7 +399,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string Loading {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.Loading);
+#else								
                 return ResourceManager.GetString("Loading", resourceCulture);
+#endif				
             }
         }
         
@@ -307,7 +412,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string Lobby {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.Lobby);
+#else								
                 return ResourceManager.GetString("Lobby", resourceCulture);
+#endif				
             }
         }
         
@@ -316,7 +425,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string MainMenu {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.MainMenu);
+#else								
                 return ResourceManager.GetString("MainMenu", resourceCulture);
+#endif				
             }
         }
         
@@ -327,7 +440,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string MessageBoxUsage {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.MessageBoxUsage);
+#else								
                 return ResourceManager.GetString("MessageBoxUsage", resourceCulture);
+#endif				
             }
         }
         
@@ -336,7 +453,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string MessageGamerJoined {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.MessageGamerJoined);
+#else								
                 return ResourceManager.GetString("MessageGamerJoined", resourceCulture);
+#endif				
             }
         }
         
@@ -345,7 +466,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string MessageGamerLeft {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.MessageGamerLeft);
+#else								
                 return ResourceManager.GetString("MessageGamerLeft", resourceCulture);
+#endif
             }
         }
         
@@ -354,7 +479,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string NetworkBusy {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.NetworkBusy);
+#else								
                 return ResourceManager.GetString("NetworkBusy", resourceCulture);
+#endif
             }
         }
         
@@ -363,7 +492,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string NoSessionsFound {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.NoSessionsFound);
+#else								
                 return ResourceManager.GetString("NoSessionsFound", resourceCulture);
+#endif
             }
         }
         
@@ -372,7 +505,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string Paused {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.Paused);
+#else								
                 return ResourceManager.GetString("Paused", resourceCulture);
+#endif
             }
         }
         
@@ -381,7 +518,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string PlayerMatch {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.PlayerMatch);
+#else								
                 return ResourceManager.GetString("PlayerMatch", resourceCulture);
+#endif
             }
         }
         
@@ -390,7 +531,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string QuitGame {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.QuitGame);
+#else								
                 return ResourceManager.GetString("QuitGame", resourceCulture);
+#endif
             }
         }
         
@@ -399,7 +544,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ResumeGame {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ResumeGame);
+#else								
                 return ResourceManager.GetString("ResumeGame", resourceCulture);
+#endif
             }
         }
         
@@ -408,7 +557,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string ReturnToLobby {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.ReturnToLobby);
+#else								
                 return ResourceManager.GetString("ReturnToLobby", resourceCulture);
+#endif
             }
         }
         
@@ -417,7 +570,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string SinglePlayer {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.SinglePlayer);
+#else								
                 return ResourceManager.GetString("SinglePlayer", resourceCulture);
+#endif
             }
         }
         
@@ -426,7 +583,11 @@ namespace CatapultGame {
         /// </summary>
         internal static string SystemLink {
             get {
+#if ANDROID				
+				return  Android.App.Application.Context.Resources.GetString(CatapultWarsNet.Resource.String.SystemLink);
+#else								
                 return ResourceManager.GetString("SystemLink", resourceCulture);
+#endif
             }
         }
     }

+ 3 - 1
Samples/MacOS/CatapultNetWars/Screens/GameplayScreen.cs

@@ -99,7 +99,9 @@ namespace CatapultGame
 		public override void LoadContent ()
 		{
 			base.LoadContent ();
-
+#if ANDROID || IOS
+			LoadAssets();
+#endif			
 			// Start the game
 			Start ();
 		}

+ 20 - 2
Samples/MacOS/CatapultNetWars/Screens/InstructionsScreen.cs

@@ -83,6 +83,12 @@ namespace CatapultGame
 		public override void HandleInput (InputState input)
 		{
 			if (isLoading == true) {
+#if ANDROID || IOS
+				// Exit the screen and show the gameplay screen 
+					// with pre-loaded assets
+				ExitScreen ();
+				ScreenManager.AddScreen (gameplayScreen, null);
+#endif						
 				base.HandleInput (input);
 				return;
 			}
@@ -112,11 +118,15 @@ namespace CatapultGame
 					// Create a new instance of the gameplay screen
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen.ScreenManager = ScreenManager;
-
+					
+#if ANDROID || IOS	
+					isLoading = true;									
+#else						
 					// Start loading the resources in additional thread
 					thread = new System.Threading.Thread (new System.Threading.ThreadStart (gameplayScreen.LoadAssets));
 					isLoading = true;
 					thread.Start ();
+#endif					
 				}
 			}
 
@@ -126,8 +136,13 @@ 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 {
@@ -137,8 +152,11 @@ namespace CatapultGame
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 #endif
 					gameplayScreen.LoadAssets ();
+#if MACOS || IOS						
 				});
-			}
+					
+			}				
+#endif	
 
 		}
 #endregion

+ 13 - 0
Samples/MacOS/CatapultNetWars/Screens/MessageBoxScreen.cs

@@ -114,6 +114,19 @@ namespace GameStateManagement
 
                 ExitScreen();
             }
+			if (input.Gestures.Count > 0)
+			{
+				foreach(var g in input.Gestures)
+				{
+					if (g.GestureType == Microsoft.Xna.Framework.Input.Touch.GestureType.Tap)
+					{
+						if (Accepted != null)
+                           Accepted(this, new PlayerIndexEventArgs(playerIndex));
+
+                        ExitScreen();
+					}
+				}
+			}
         }
 
 

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

@@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.CatapultWa
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.AdMob", "Android\MonoGame.Samples.AdMob\MonoGame.Samples.AdMob.csproj", "{DD08D5F1-DE83-41C1-B599-76DC604643EB}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatapultNetWars", "Android\CatapultWarsNet\CatapultNetWars.csproj", "{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -41,6 +43,7 @@ Global
 		{167741E2-2D8E-474A-8D06-9ACB55F0BA83}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{167741E2-2D8E-474A-8D06-9ACB55F0BA83}.Release|Any CPU.Build.0 = Release|Any CPU
 		{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}.Debug|Any CPU.Build.0 = 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
@@ -63,6 +66,10 @@ Global
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C2B4D7C6-C3C5-4C02-8830-D33C0E59DCDD}.Release|Any CPU.Build.0 = Release|Any CPU
 		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -87,7 +94,7 @@ Global
 		{E2B6ED3C-A769-47AF-9605-A7410F194B1C}.Release|Any CPU.Deploy.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Android\MonoGame.Samples.AdMob\MonoGame.Samples.AdMob.csproj
+		StartupItem = Android\CatapultWarsNet\CatapultNetWars.csproj
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE