private void LevelTwo_Click(object sender, EventArgs e)
 {
     player = MediaPlayer.Create(Activity, Resource.Raw.plop_sound);
     player.Start();
     Android.Support.V4.App.Fragment fragmentLogin = new LevelTwoFragment(0);
     FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
 }
Exemplo n.º 2
0
 private void LeftBlock_Click(object sender, EventArgs e)
 {
     player = MediaPlayer.Create(Activity, Resource.Raw.plop_sound);
     player.Start();
     if (leftBlock.IsCorrectAnswer)
     {
         CorrectAnswers++;
         player = MediaPlayer.Create(Activity, Resource.Raw.correctAnswer);
         player.Start();
         if (CorrectAnswers == 5)
         {
             Android.Support.V4.App.Fragment fragmentLogin = new YouTubeVideo();
             FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
         }
         else
         {
             Android.Support.V4.App.Fragment fragmentLogin = new LevelTwoFragment(CorrectAnswers);
             FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
         }
     }
     else
     {
         player = MediaPlayer.Create(Activity, Resource.Raw.hmmThinkAgain);
         player.Start();
         //wait to 2 sec
         rightBlock.Player.Start();
     }
 }