using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Snake
{
    class GameOverScreen : MenuScreen
    {
        MenuEntry ok = new MenuEntry("В меню");

        public GameOverScreen()
            : base("Игра закончена")
        {
            ok.Selected += OkMenuEntrySelected;
            MenuEntries.Add(ok);
        }

        void OkMenuEntrySelected(object sender, PlayerIndexEventArgs arg)
        {
            ToMainMenu();
        }

        protected override void OnCancel(PlayerIndex index)
        {
            ToMainMenu();
        }

        void ToMainMenu()
        {
            LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
        }
    }
}
