Prechádzať zdrojové kódy

Make sure that when the Video ends we see our cornflower blue screen.

CartBlanche 13 rokov pred
rodič
commit
45e295c5c7

BIN
Samples/MacOS/VideoPlayer/Content/Jackie Brown-Trailer.mov


BIN
Samples/MacOS/VideoPlayer/Content/sintel_trailer.mp4


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

@@ -67,7 +67,7 @@ namespace Microsoft.Xna.Samples.Draw2D
 			// TODO: use this.Content to load your game content here
 			font = Content.Load<SpriteFont> ("spriteFont1");
 			
-			video = Content.Load<Video> ("Jackie Brown-Trailer");
+			video = Content.Load<Video> ("sintel_trailer");
 			videoPlayer = new VideoPlayer(this);
 			playVideo = true;
 		}
@@ -84,7 +84,8 @@ namespace Microsoft.Xna.Samples.Draw2D
 			{
 				if (videoPlayer.State == MediaState.Stopped) 
 				{
-					videoPlayer.Play(video);	
+					videoPlayer.Play(video);
+					playVideo = false;
 				}
 			}
 
@@ -101,7 +102,7 @@ namespace Microsoft.Xna.Samples.Draw2D
 			
 			// Won't be visible until we hide the movie
 			spriteBatch.Begin();
-			spriteBatch.DrawString(font, "Video Player Test", new Vector2 (50, 40), Color.Red);
+			spriteBatch.DrawString(font, "Video has ended, let the Game BEGIN!!", new Vector2 (50, 40), Color.Red);
 			spriteBatch.End();
 		}
 	}

+ 1 - 1
Samples/MacOS/VideoPlayer/MonoGame.Samples.VideoPlayer.MacOS.csproj

@@ -55,7 +55,7 @@
     <Content Include="Content\spriteFont1.xnb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="Content\Jackie Brown-Trailer.mov">
+    <Content Include="Content\sintel_trailer.mp4">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
   </ItemGroup>