Пример #1
0
        public static void setScene(CenaBase cena, int indexCena, bool isCenaAtual)
        {
            CenaManager.isCenaAtual = isCenaAtual;

            if (current != null)
                current.terminate();

            current = cena;

            if (current != null)
                current.start(indexCena);
        }
Пример #2
0
        public override void start()
        {
            SoundManager.StopMusic();

            SoundManager.FadeInVelocity = 1f;
            SoundManager.SetMusic("GameplaySong1", true, false, false);

            cena = new CenaManagement.CenaBase();
            Self = this;

            heart = new Heart();

            CenaManagement.CenaManager.setScene(cena, 0, true);
        }
Пример #3
0
        public static void setScene(CenaBase cena, int indexCena, bool isCenaAtual)
        {
            CenaManager.isCenaAtual = isCenaAtual;

            if (current != null)
            {
                current.terminate();
            }

            current = cena;

            if (current != null)
            {
                current.start(indexCena);
            }
        }
        public void Update(GameTime gameTime)
        {
            heart.Update(gameTime);

            if (Controller.KeyPressed(Keys.Enter) && heart.autoPilot == true)
            {
                heart.EndAutoPilot();
            }

            if (heart.autoPilot == false)
            {
                contadorTempo--;
                decisaoDesenhada = true;

                if (contadorTempo == 0)
                {
                    if (indexCena != 47 && indexCena != 48)
                    {
                        checkConsequence();
                        heart.StartAutoPilot(gameTime);
                        contadorTempo    = 900;
                        decisaoDesenhada = false;
                    }

                    else
                    {
                        SceneManagement.SceneManager.setScene(new Scenes.Menu(), true);
                    }
                }
            }
            if ((heart.heartSpeed < 20) || (heart.heartSpeed > 150))
            {
                CenaBase.matarHeroi("");
            }

            line.Update(gameTime);
            caixaTexto.Update(gameTime);
        }