浏览代码

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

dellis1972 14 年之前
父节点
当前提交
5d7277bf69

+ 5 - 5
Samples/Android/RenderTarget2D/Activity1.cs

@@ -7,18 +7,18 @@ using Android.Views;
 using Android.Widget;
 using Android.OS;
 
-namespace MonoGame.Samples.RenderTarget2D.Android
+namespace RenderTarget2DSample
 {
-	[Activity (Label = "MonoGame.Samples.RenderTarget2D.Android", MainLauncher = true)]
+	[Activity (Label = "RenderTarget2D", MainLauncher = true)]
 	public class Activity1 : Activity
 	{
 		protected override void OnCreate (Bundle bundle)
 		{
 			base.OnCreate (bundle);
 
-			// Create our OpenGL view, and display it
-			GLView1 view = new GLView1 (this);
-			SetContentView (view);
+			var g = new Game1(this);
+            SetContentView(g.Window);
+            g.Run();
 		}
 	}
 }

+ 18 - 2
Samples/Android/RenderTarget2D/MonoGame.Samples.RenderTarget2D.Android.csproj

@@ -21,7 +21,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
+    <DefineConstants>DEBUG;ANDROID</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
@@ -46,9 +46,11 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Activity1.cs" />
-    <Compile Include="GLView1.cs" />
     <Compile Include="Resources\Resource.designer.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\..\MacOS\RenderTarget2DSample\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
   </ItemGroup>
   <ItemGroup>
     <None Include="Resources\AboutResources.txt" />
@@ -60,4 +62,18 @@
     <AndroidResource Include="Resources\drawable\Icon.png" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+  <ItemGroup>
+    <AndroidAsset Include="..\..\MacOS\RenderTarget2DSample\Content\MooTheMerciless.xnb">
+      <Link>Assets\Content\MooTheMerciless.xnb</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\..\MacOS\RenderTarget2DSample\Content\wood.xnb">
+      <Link>Assets\Content\wood.xnb</Link>
+    </AndroidAsset>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Android.csproj">
+      <Project>{BA9476CF-99BA-4D03-92F2-73D2C5E58883}</Project>
+      <Name>MonoGame.Framework.Android</Name>
+    </ProjectReference>
+  </ItemGroup>
 </Project>