Explorar o código

Added the mp4 of the sintel trailer
Updated the CatapaultWars/Screens/InstructionsScreen.cs to allow the loading graphics to display on android and ios.
Updated the video player sample on android to use the mp4 trailer

Dean Ellis %!s(int64=13) %!d(string=hai) anos
pai
achega
2e8311caa3

BIN=BIN
Samples/Android/VideoPlayer/Assets/Content/sintel_trailer.mp4


+ 2 - 2
Samples/Android/VideoPlayer/MonoGame.Samples.VideoPlayer.csproj

@@ -68,8 +68,8 @@
     <AndroidAsset Include="..\..\MacOS\VideoPlayer\Content\spriteFont1.xnb">
       <Link>Assets\Content\spriteFont1.xnb</Link>
     </AndroidAsset>
-    <AndroidAsset Include="..\..\MacOS\VideoPlayer\Content\sintel_trailer.3gp">
-      <Link>Assets\Content\sintel_trailer.3gp</Link>
+    <AndroidAsset Include="Assets\Content\sintel_trailer.mp4">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </AndroidAsset>
   </ItemGroup>
   <ItemGroup>

+ 9 - 9
Samples/Android/VideoPlayer/Resources/Resource.designer.cs

@@ -1,12 +1,12 @@
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 4.0.30319.1
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+// <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.VideoPlayer
 {

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

@@ -81,6 +81,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,13 +118,8 @@ namespace CatapultGame
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen.ScreenManager = ScreenManager;
 					
-#if ANDROID || IOS					
-					isLoading = false;
-					
-					// Exit the screen and show the gameplay screen 
-					// with pre-loaded assets
-					ExitScreen ();
-					ScreenManager.AddScreen (gameplayScreen, null);
+#if ANDROID || IOS	
+					isLoading = true;									
 #else				
 					// Start loading the resources in additional thread
 					thread = new System.Threading.Thread (new System.Threading.ThreadStart (gameplayScreen.LoadAssets));

+ 4 - 0
Samples/MacOS/VideoPlayer/Game1.cs

@@ -77,6 +77,10 @@ namespace MonoGame.Samples.VideoPlayer
 		/// <param name="gameTime">Provides a snapshot of timing values.</param>
 		protected override void Update (GameTime gameTime)
 		{
+			if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
+			{
+				Exit();
+			}
 			// TODO: Add your update logic here
 			if (playVideo)
 			{