public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);

            //Musica
            if (!onloop && Sonido.IsMusicStop()) {
                onloop = true;
                Sonido.PlayMusic(PiezasMusica.CuevaLoop);
            }

            if (IsActive) {

                oleadaTimeDelay += gameTime.ElapsedGameTime.Milliseconds;

                //Goblin
                foreach (Goblin goblin in goblins) {
                    goblin.Update(gameTime);
                }

                //Goblin Rey
                goblinRey.Update(gameTime);

                //Humano
                foreach (Humano humano in humanosInvadiendo) {
                    humano.Update(gameTime);
                }

                //Trampas
                foreach (Trampa trampa in trampas) {
                    trampa.Update(gameTime);
                }

                //Gui
                gui.Update(
                    this.Herramientas,
                    Forja.Forja.NivelArma,
                    Forja.Forja.NivelArmadura,
                    Forja.Forja.TrampasDisponibles,
                    goblins.Sum(g => g.ContadorMuertes) + trampas.Sum(t => t.ContadorMuertes),
                    oleadaActual - 1,
                    (int)(oleadaMaxdelay - oleadaTimeDelay) / 1000,
                    this.dificultad
                );

                if (oleadaTimeDelay >= oleadaMaxdelay) {
                    if (this.modoInfinito || oleadaActual <= 5) {
                        if (oleadaActual == 6) {
                            ++this.dificultad;
                            oleadaActual = 1;
                            AgregarHumanos();
                        }

                        GenerarOleada(oleadaActual, this.dificultad);
                        ++oleadaActual;
                        oleadaTimeDelay = 0f;
                    }
                }

                if (!this.modoInfinito && VerificaVictoria()) {
                    delayMsg += gameTime.ElapsedGameTime.Milliseconds;

                    if (delayMsg >= delayMaxMsg) {
                        PopupScreen victoria = new PopupScreen(
                            "Viva el Rey King K.!!!! El rey del nuevo mundo",
                            "\nPresione <ESC> para continuar", true);

                        victoria.Accepted += end_Accepted;
                        victoria.Cancelled += end_Accepted;

                        ScreenManagerController.AddScreen(victoria, null);
                    }
                } else if (VerificaDerrota()) {
                    delayMsg += gameTime.ElapsedGameTime.Milliseconds;

                    if (delayMsg >= delayMaxMsg) {
                        PopupScreen derrota = new PopupScreen(
                            "El Rey King. K. ha muerto... sucios humanos!",
                            "\nPresione <ESC> para continuar", true);

                        derrota.Accepted += end_Accepted;
                        derrota.Cancelled += end_Accepted;

                        ScreenManagerController.AddScreen(derrota, null);
                    }
                }
            }
        }
        private void NotImplemented(object sender, PlayerIndexEventArgs e)
        {
            PopupScreen notImplemented = new PopupScreen("Aun no implementado", "\nPresione <ESC> para volver", true);

            ScreenManagerController.AddScreen(notImplemented, null);
        }
        /// <summary>
        /// BUG: Al cambiar de goblin este queda en su último estado.
        /// </summary>
        /// <param name="input"></param>
        public override void HandleInput(InputState input)
        {
            if (IsActive) {
                if (input.IsSpace(null)) {
                    HandleSelectGoblin();
                }

                if (input.IsEscape(null)) {
                    PopupScreen salir = new PopupScreen("Está seguro que quiere salir? o.ó ");

                    salir.Accepted += end_Accepted;

                    ScreenManagerController.AddScreen(salir, null);
                }

                foreach (Goblin goblin in goblins) {
                    if (goblin.ID == selectedGoblin)
                        if (goblin.EstadoPersonaje != EstadoPersonaje.Muerto)
                            goblin.HandleInput(input);
                        else {
                            HandleSelectGoblin();
                        }
                }
            }
        }