Ejemplo n.º 1
0
        public void Play(out Team Winner)
        {
            Start?.Invoke();
            Jingle?.Invoke("/Opening.mp3");
            RequestIn("Готовы к следующему раунду?");

            foreach (Round round in Rounds)
            {
                CurrentRound = round;
                RequestOut($"== {round.Name} ==");
                Jingle?.Invoke(round.Jingle);
                RefreshBoard?.Invoke();

                int score = round.Play(out Winner);
                Winner.Score += score;
                SetScore();

                RequestOut("-- Открываем табло --");
                round.Reveal();
                RequestIn("Готовы к следующему раунду?");
            }

            CurrentRound = FinalRound;
            RequestOut($"== {FinalRound.Name} ==");
            Jingle?.Invoke(FinalRound.Jingle);
            ShowTitle();
            FinalRound.Play(out Winner);

            Winner = Teams.OrderByDescending(team => team.Score)
                     .Take(1)
                     .Single();

            Jingle?.Invoke("/Closing.mp3");
            RequestIn("Нажмите для завершения игры");
            ShowTitle();
            TheEnd?.Invoke();
        }
Ejemplo n.º 2
0
 private void frmSchool_FormClosing(object sender, FormClosingEventArgs e) => TheEnd?.Invoke(sender, e);
Ejemplo n.º 3
0
 private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e)
 {
     SharedConfiguration.ConfigurationChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
     conn.Dispose();
 }
Ejemplo n.º 4
0
 private void frmObsada_FormClosing(object sender, FormClosingEventArgs e)
 {
     TheEnd?.Invoke(sender, e);
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
 }
Ejemplo n.º 5
0
 private void frmKontrolaNieobecnosci_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
Ejemplo n.º 6
0
 private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
Ejemplo n.º 7
0
 private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            intro = new Intro(Content, Window);

            menu = new Menu(Content, Window);

            credito = new Credito(Content, Window);

            fase1 = new Fase1(Content, Window);

            fase2 = new Fase2(Content, Window);

            gameOver = new GameOver(Content, Window);

            theEnd = new TheEnd(Content, Window);

            easter = new Easter(Content, Window);
        }
Ejemplo n.º 9
0
 private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e)
 {
     SharedConfiguration.ConfigurationChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
     conn.Dispose();
 }
Ejemplo n.º 10
0
 private void Awake()
 {
     instance = this;
 }