Commits

André Schnabel committed f7b15d1

Sync with Kosu

  • Participants
  • Parent commits 8ac98c1

Comments (0)

Files changed (2)

File GameScreen.cs

 		private int ty;
 		private bool touchInputResult;
 		private static Sound startRoundSnd = new Sound("sounds/startround.wav");
+		private static Song curSong;
 
 		public GameScreen(IStateManager stateManager) : base(stateManager) {
 			gameStartTime = Utils.GetTicks();
 			hudRenderer.Dispose();
 			//atlas.Dispose();
 			doorAnimMgr.Dispose();
+			Utils.SafeDispose(ref curSong);
 		}
 
 		public override void ProcessKeyboardInput(KeyboardDevice pkeyDevice, long delta) {
 
 			mvmt = new Movement(cam, map, doorManager, player);
 
-			//MusicManager.Stop();
-			//MusicManager.PlaySong(pCurMap, true);
+			var songFilenames = new[] {
+				"collisionavoidance.ogg",
+				"fragmentation.ogg",
+				"highpass.ogg",
+				"intrusion.ogg",
+				"meltingchips.ogg"
+			};
+			Utils.SafeDispose(ref curSong);
+			curSong = new Song("songs/" + songFilenames[pCurMap-1]);
+			curSong.Play(true);
 		}
 
 		private IMapRenderer SelectMapRenderer() {

File SplashScreen.cs

 using Kosu;
+using Kosu.Audio;
 using Kosu.Cameras;
 using Kosu.Rendering.Fonts;
 using Kosu.Rendering.Sprites;
 		private SpriteBatch sb = new SpriteBatch("splash.png");
 		private bool startGameScheduled;
 		private float vOff = Globals.ScrH;
+		private Song introSong = new Song("songs/introsound.ogg");
 
 		public SplashScreen(IStateManager stateManager) : base(stateManager) {
 			Constants.isDesktop = Globals.Platform.GetType().ToString().Contains("Desktop") && !Constants.ANDROID_TEST;
 			GL.ClearColor(BgBrightness, BgBrightness, BgBrightness, 1.0f);
 			//MusicManager.PlaySong((int) SongsType.IntroSound, true);
+			introSong.Play(true);
 			cam.Apply();
 		}
 
 		public override void Dispose() {
 			Utils.SafeDispose(ref sb);
 			Utils.SafeDispose(ref fb);
+			Utils.SafeDispose(ref introSong);
 		}
 
 		public override void ProcessKeyboardInput(KeyboardDevice keyDevice, long delta) {