示例#1
0
        public override void start()
        {
            video = Game1.Self.Content.Load<Video>("VideoIntro");
            videoPlayer = new VideoPlayer();
            videoPlayer.Play(video);
            layer = new Objeto2D(videoPlayer.GetTexture());
            layer.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            layer.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            if (SoundManager.isEffectsMuted)
                videoPlayer.Volume = 0;
        }
示例#2
0
 public void createParticle(Vector2 position)
 {
     Objeto2D particle = new Objeto2D(this.textura);
     particle.position = position;
     if (!Heart.Self.isDead)
         particle.color = Color.LightGreen;
     else
         particle.color = Color.Red;
     particle.ScaleX = particle.ScaleY = 0.2f;
     particle.alpha = 0.7f;
     lineList.Add(particle);
 }
示例#3
0
        public Boolean hitTestObject(Objeto2D objeto)
        {
            this.CalcularRetangulo();
            objeto.CalcularRetangulo();

            if (this.collisionBounds.Intersects(objeto.collisionBounds))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#4
0
        private void updateParticles()
        {
            for (int i = 0; i < lineList.Count; i++)
            {
                Objeto2D particle = lineList[i];

                particle.alpha = MathHelper.Lerp(particle.alpha, 0, 0.007f);

                if (particle.alpha <= 0.02f)
                {
                    lineList.Remove(particle);
                }
            }
        }
示例#5
0
        public override void start()
        {
            SoundManager.SetMusic("GameOverSong", true, false, false);
            posicao = new Vector2(285, 590);
            fundoGameOver = new Objects.Objeto2D(Game1.Self.Content.Load<Texture2D>("fundoGameOver"));
            fundoGameOver.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            fundoGameOver.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            tracinho = new Objeto2D(Game1.Self.Content.Load<Texture2D>("tracinho"));
            tracinho.position = posicao;
            contadorDrawUnderline = 0;
            contadorMenu = 1;

            font = Game1.Self.Content.Load<SpriteFont>("OCR");
        }
示例#6
0
        public override void start()
        {
            delay = TimeSpan.FromSeconds(5d);

            //SoundManager.SetMusic("GameOverSong", true, false, false);

            fundoGameOver = new Objeto2D(Game1.Self.Content.Load<Texture2D>("fundoGame"));
            fundoGameOver.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            fundoGameOver.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            contadorDrawUnderline = 0;
            contadorMenu = 1;

            startTime = Game1.currentTime;

            font = Game1.Self.Content.Load<SpriteFont>("OCR");
        }
示例#7
0
        public void createParticle(Vector2 position)
        {
            Objeto2D particle = new Objeto2D(this.textura);

            particle.position = position;
            if (!Heart.Self.isDead)
            {
                particle.color = Color.LightGreen;
            }
            else
            {
                particle.color = Color.Red;
            }
            particle.ScaleX = particle.ScaleY = 0.2f;
            particle.alpha  = 0.7f;
            lineList.Add(particle);
        }
示例#8
0
        public Boolean hitTestObject(Objeto2D objeto)
        {
            this.CalcularRetangulo();
            objeto.CalcularRetangulo();

            if (this.collisionBounds.Intersects(objeto.collisionBounds))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
示例#9
0
        public void start(int indexCena)
        {
            this.indexCena = indexCena;
            fundoGame = new Objects.Objeto2D(Game1.Self.Content.Load<Texture2D>("fundoGame"));
            fundoGame.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            fundoGame.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            heart = new DumativaHeart.Objects.Heart();

            avisoReading = new Objeto2D(Game1.Self.Content.Load<Texture2D>("reading"));
            avisoReading.position.X = 500;
            avisoReading.position.Y = 425;

            avisoFollow = new Objeto2D(Game1.Self.Content.Load<Texture2D>("follow_your_heart"));
            avisoFollow.position.X = 500;
            avisoFollow.position.Y = 425;

            contadorTempo = 600;
            Save.lerXml(indexCena);
            caixaTexto = new Textbox(800, new Vector2(100, 200), Save.textoAtual, 10, 20);
            fontDecisao = Game1.Self.Content.Load<SpriteFont>("fontDecisao");
            heart.autoPilot = true;

            font = Game1.Self.Content.Load<SpriteFont>("OCR");
            line = new Line();

            backRender = new RenderTarget2D(Game1.Self.GraphicsDevice, Game1.GameRactangle.Width, Game1.GameRactangle.Height);
        }
示例#10
0
        public override void start()
        {
            Self = this;
            listaStrings = new List<string>();
            listaStrings.Add("Hey... are you there?");
            listaStrings.Add("It's time to wake up, can you do that?");
            listaStrings.Add("I see, you can't do anything right now...");
            listaStrings.Add("I will help you then. Press 'A' to control the first beat of your heart.");
            listaStrings.Add("Nice! But that is not good enough to wake you up. Press 'S' or 'L' to control the second beat of your heart.");
            listaStrings.Add("Awesome! Now is the time. Press 'A' Then Press 'S' or 'L' alternately, in a heartbeat rhythm. That should do it.");
            listaStrings.Add("Perfect! I think it's working, soon you will be awake for good. I have one last thing to teach you. It's the most important thing you have to do now before you awake.");
            listaStrings.Add("Something is wrong with your body. If the beat is too fast, you will make tense and stressed choices... Try to stress your heart now.. But not too much ! Otherwise you will have a heart attack and well... die.");
            listaStrings.Add("Awesome! In the other hand, if the beat is too slow, you will make controlled and sensible choices... Now, Try to calm your heart down. But not too much ! Otherwise you will have a cardiac arrest and also die.");
            listaStrings.Add("Perfect! It seems a little tough right now, but you will get used to it. When you see 'Reading' on the screen, you can take your time to read the text. Press 'Enter' when you are done to go to the next step.  When you see 'Follow your heart' on the monitor, a decision has to be made. You will have to control your heartbeat.");
            listaStrings.Add("Great! You remained calm even with all those news. This is a good Sign!");
            listaStrings.Add("Wow! You're already stressed. Calm down my friend! There are a lot of things yet to come. This is just the beginning.");
            listaStrings.Add("You're awaking now. I can't help you anymore because of reasons you will not understand. Good Luck and stay alive!");

            backRender = new RenderTarget2D(Game1.Self.GraphicsDevice, Game1.GameRactangle.Width, Game1.GameRactangle.Height);

            SoundManager.StopMusic();

            avisoReading = new Objeto2D(Game1.Self.Content.Load<Texture2D>("reading"));
            avisoReading.position.X = 500;
            avisoReading.position.Y = 425;

            avisoFollow = new Objeto2D(Game1.Self.Content.Load<Texture2D>("follow_your_heart"));
            avisoFollow.position.X = 500;
            avisoFollow.position.Y = 425;

            fundo = new Objects.Objeto2D(Game1.Self.Content.Load<Texture2D>("fundoGame"));
            fundo.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            fundo.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            heart = new DumativaHeart.Objects.Heart();
            line = new Line();

            contadorTentativa = 600;
            contadorNextTexto = 240;
            fraseAtual = 0;

            textoLido = false;

            filtro = new Objeto2D(Game1.Self.Content.Load<Texture2D>("filtro vermelho"));
            //filtro.position.X = Game1.Self.Window.ClientBounds.Width / 2;
            //filtro.position.Y = Game1.Self.Window.ClientBounds.Height / 2;

            caixaTexto = new Textbox(800, new Vector2(100, 200), listaStrings[fraseAtual], 10, 20);
            font = Game1.Self.Content.Load<SpriteFont>("OCR");
            fontDecisao = Game1.Self.Content.Load<SpriteFont>("fontDecisao");
        }