Ejemplo n.º 1
0
        private void DTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                if (frameScore >= Global.GameScore)
                {
                    Score_Result = "Score: " + Global.GameScore;
                    frameScore   = Global.GameScore;
                    bScore       = true;
                }
                else
                {
                    frameScore  += 1;
                    Score_Result = "Score: " + frameScore;
                }

                if (frameTime >= Global.GameTime)
                {
                    Time_Result = "Time: " + Global.GameTime;
                    frameTime   = Global.GameTime;
                    bTime       = true;
                }
                else
                {
                    frameTime  += 1;
                    Time_Result = "Time: " + frameTime;
                }

                if (bScore && bTime)
                {
                    BG_PlayerScore.Stop();
                    BG_Player.Play();
                    DTimer.Stop();
                }
            }
            catch { }
        }
Ejemplo n.º 2
0
 private void BG_Player_MediaEnded(object sender, RoutedEventArgs e)
 {
     BG_Player.Play();
 }