Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (GameObject.Find(Network.player.ipAddress) && crearLlubia)
        {
            lluvia = (GameObject)Instantiate(lluviaPrefab, transform.position, transform.rotation);
            lluvia.transform.parent        = Camera.main.transform;
            lluvia.transform.localPosition = Vector3.zero;
            crearLlubia = false;
        }

        tiempo -= Time.deltaTime;

        if (tiempo < 0)
        {
            luz.GetComponent <Light> ().color     = Color.white;
            luz.GetComponent <Light> ().intensity = 8;

            Camera.main.transform.parent = GameObject.Find("IniciarVariables").transform;

            Destroy(lluvia);
            Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
            mision.terminoMision = true;
            Network.Destroy(GameObject.Find(Network.player.ipAddress));
            GameObject g = (GameObject)Network.Instantiate(General.personaje, GameObject.Find("PlayerJuego").transform.position, new Quaternion(), 1);
            g.transform.localScale = new Vector3(2, 2, 2);
            g.AddComponent <BoxCollider> ();
            g.GetComponent <BoxCollider> ().size = new Vector3(0.1f, 0.1f, 0.1f);
            g.name = Network.player.ipAddress;

            SceneManager.LoadScene("level1");
        }
    }
Example #2
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView>().isMine)
        {
            switch (General.paso_mision)
            {
            case 1:
                if (tiempo > 20)
                {
                    mensaje = "Hola, Soy Gonzalo Gimenez de Quesada";
                }
                else if (tiempo > 15)
                {
                    mensaje = "Para poder pasar debes traer un tributo al virrey";
                }
                else if (tiempo > 10)
                {
                    mensaje = "Pero solo entran tres personas al tiempo";
                }
                else if (tiempo > 5)
                {
                    mensaje = "Ven con 3 amigos y te dejo entrar";
                }
                break;

            case 2:
                mensaje = "Recuerda, vuelve con tres amigos que tengan su respectivo tributo";
                break;

            case 3:
                if (tiempo > 10)
                {
                    mensaje = "He observado que traen sus tributos";
                }
                else if (tiempo > 5)
                {
                    mensaje = "podeis pasar, sean respetusos con su virrey";
                    GameObject.Find("puerta").GetComponent <BoxCollider>().isTrigger = true;
                }
                break;
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(0, 3 * Screen.height / 4, Screen.width, Screen.height / 4), mensaje);

            if (General.paso_mision == 1 && General.misionActual[0] == "2" && tiempo < 0.5)
            {
                //General.timepo = 10;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                mision.procesoMision2(General.paso_mision);
            }

            MoverMouse.movimiento = true;
        }
    }
Example #3
0
    void DestruirChoza()
    {
        if (GameObject.Find("ChozaLlamas"))
        {
            target = GameObject.Find("ChozaLlamas");
        }
        else if (GameObject.Find("PlayerJuego") && casa.active)
        {
            target = GameObject.Find("PlayerJuego");
        }

        if (Vector3.Distance(target.transform.position, transform.position) > 5)
        {
            Quaternion rotacion = Quaternion.LookRotation(target.transform.position - transform.position);
            transform.rotation = Quaternion.Slerp(transform.rotation, rotacion, 6.0f * Time.deltaTime);
            transform.Translate(0, 0, 6.0f * Time.deltaTime);
            tiempo = 30;
            if (GameObject.Find("Medieval_House"))
            {
                casa.SetActive(false);
            }
            animator.SetFloat("speed", 1.0f);
        }
        else
        {
            animator.SetFloat("speed", 0.0f);
            tiempo -= Time.deltaTime;
        }

        if ((tiempo > 0) && hablar)
        {
            if (tiempo > 28 && tiempo < 29 && (!GameObject.Find("ChozaLlamas")))
            {
                Destroy(GameObject.Find("ChozaCompleta"));
                target      = (GameObject)Instantiate(destruccionChoza, posicioninicial.position, transform.rotation);
                target.name = "ChozaLlamas";
                llego       = false;
            }

            if (tiempo > 20 && tiempo < 29)
            {
                llego   = true;
                mensaje = "Esta tierra es ahora del virrey";
            }

            if (tiempo < 1 && tiempo > 0 && GameObject.Find("ChozaLlamas"))
            {
                Destroy(GameObject.Find("ChozaLlamas"));
                target = GameObject.Find("PlayerJuego");
                hablar = false;
                llego  = false;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                mision.procesoMision2(General.paso_mision);
            }
        }
    }
Example #4
0
        //
        // GET: /Mision/Delete/5

        public ActionResult Delete(int id = 0)
        {
            Misiones misiones = db.Misiones.Find(id);

            if (misiones == null)
            {
                return(HttpNotFound());
            }
            return(View(misiones));
        }
Example #5
0
    // Update is called once per frame
    void Update()
    {
        if (cosntrullendo)
        {
            tiempo -= Time.deltaTime;

            activarBoton = false;

            GameObject chozaLevel;
            if (tiempo > 28 && tiempo < 39)
            {
                chozaLevel = GameObject.Find("choza1");
                chozaLevel.transform.position = new Vector3(posicionInstanciar.position.x - 1, posicionInstanciar.position.y, posicionInstanciar.position.z);
            }
            else if (tiempo > 20 && tiempo < 21)
            {
                Destroy(GameObject.Find("choza1"));
                chozaLevel = GameObject.Find("choza2");
                chozaLevel.transform.position = chozaLevel.transform.position = new Vector3(posicionInstanciar.position.x - 4, posicionInstanciar.position.y, posicionInstanciar.position.z);
            }
            else if (tiempo > 12 && tiempo < 13)
            {
                if (crearChozaMulti)
                {
                    Destroy(GameObject.Find("choza2"));

                    chozaLevel = GameObject.Find("choza3");
                    chozaLevel.transform.localScale = new Vector3(4f, 4f, 4f);
                    chozaLevel.transform.position   = new Vector3(posicionInstanciar.position.x - 4, posicionInstanciar.position.y, posicionInstanciar.position.z);

                    NetworkView nw = Camera.main.GetComponent <NetworkView>();

                    nw.RPC("crearChozaMultiplayer", RPCMode.OthersBuffered, player.name, posicionInstanciar.position, 2);
                    playerAnimator.SetBool("construir", false);

                    MoverMouse.cambioCamara = false;
                    MoverMouse.movimiento   = true;

                    crearChozaMulti = false;
                }
            }
        }

        if (tiempo < 0)
        {
            if (cosntrullendo)
            {
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                mision.procesoMision1(General.paso_mision);
                Camera.main.transform.rotation = camaraOriginal.rotation;
                MoverMouse.movimiento          = true;
            }
            cosntrullendo = false;
        }
    }
Example #6
0
 public void OnTriggerEnter(Collider colision)
 {
     if (colision.name == Network.player.ipAddress)
     {
         player = colision.gameObject;
         if (General.paso_mision == 7 && General.misionActual [0] == "2")
         {
             tiempo = 5;
             MoverMouse.cambioCamara = true;
             trasportar = true;
             if (!soyEntrar)
             {
                 Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                 mision.procesoMision2(General.paso_mision);
             }
         }
         else if (General.paso_mision == 7 && General.misionActual [0] == "3")
         {
             Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
             if (soyEntrar && numeroCasa == mision.numeroLlave)
             {
                 MoverMouse.cambioCamara = true;
                 trasportar = true;
                 mision.procesoMision3(General.paso_mision);
             }
         }
         else if (General.paso_mision == 8 && General.misionActual [0] == "3")
         {
             Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
             if (numeroCasa == mision.numeroLlave)
             {
                 trasportar = true;
             }
         }
         else if (General.paso_mision > 8 && General.paso_mision < 11 && General.misionActual [0] == "3")
         {
             Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
             if (numeroCasa == mision.numeroLlave)
             {
                 trasportar = true;
             }
         }
         else if (General.paso_mision == 11 && General.misionActual[0] == "3")
         {
             Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
             if (soyEntrar && numeroCasa == mision.numeroLlave)
             {
                 mision.procesoMision3(General.paso_mision);
                 MoverMouse.cambioCamara = true;
                 trasportar = true;
             }
         }
     }
 }
Example #7
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         Misiones misiones = db.Misiones.Find(id);
         db.Misiones.Remove(misiones);
         db.SaveChanges();
     }
     catch (Exception)
     {
         throw new Exception("Este registro se utiliza en una relacion y no lo puede borrar");
     }
     return(RedirectToAction("Index"));
 }
Example #8
0
    // Update is called once per frame
    void Update()
    {
        if (entro)
        {
            tiempo -= Time.deltaTime;

            if (tiempo < 0)
            {
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                mision.procesoMision1(General.paso_mision);
                entro = false;
            }
        }
    }
Example #9
0
    // Update is called once per frame
    void Update()
    {
        tiempo          -= Time.deltaTime;
        tiempoAnimacion -= Time.deltaTime;

        if (tiempoAnimacion < 0 && tomaHojas)
        {
            if (playerAnimator != null)
            {
                playerAnimator.SetBool("recojer", false);
                transform.position      = new Vector3(-10, -10, -10);
                MoverMouse.movimiento   = true;
                MoverMouse.cambioCamara = false;
                if (actualizar && General.paso_mision == 5 && General.misionActual[0] == "1")
                {
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                    gameObject.GetComponent <MeshRenderer> ().enabled = false;
                    gameObject.GetComponent <BoxCollider> ().enabled  = false;
                    mision.procesoMision1(General.paso_mision);
                    actualizar = false;
                }
            }
        }
        if (tiempo < 0)
        {
            tomaHojas = false;
        }
        if (General.misionActual[0] == "1" && General.paso_mision == 5)
        {
            gameObject.GetComponent <MeshRenderer>().enabled = true;
            gameObject.GetComponent <LensFlare>().enabled    = true;
        }
        else if (General.paso_mision > 5 && General.misionActual[0] == "1")
        {
            if (playerAnimator != null)
            {
                playerAnimator.SetBool("recojer", false);
            }
            Maleta maleta = Camera.main.gameObject.GetComponent <Maleta>();
            maleta.agregarTextura(hoja);
            maleta.agregarTextura(hoja);
            Destroy(gameObject);
        }
        else if (General.paso_mision == 1 && General.misionActual[0] == "1")
        {
            gameObject.GetComponent <MeshRenderer>().enabled = false;
            gameObject.GetComponent <LensFlare>().enabled    = false;
        }
    }
Example #10
0
        public ActionResult Create(Misiones misiones)
        {
            if (ModelState.IsValid)
            {
                db.Misiones.Add(misiones);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }
            var personas = from p in db.Persona
                           where p.activo
                           select new { p.id, nombre = p.nombre + " " + p.apellido1 + " " + (p.apellido2 ?? "") };

            ViewBag.Personaid = new SelectList(personas, "id", "nombre", misiones.Personaid);
            return(View(misiones));
        }
Example #11
0
        //
        // GET: /Mision/Edit/5

        public ActionResult Edit(int id = 0)
        {
            Misiones misiones = db.Misiones.Find(id);

            if (misiones == null)
            {
                return(HttpNotFound());
            }
            var personas = from p in db.Persona
                           where p.activo
                           select new { p.id, nombre = p.nombre + " " + p.apellido1 + " " + (p.apellido2 ?? "") };

            ViewBag.Personaid = new SelectList(personas, "id", "nombre", misiones.Personaid);
            return(View(misiones));
        }
Example #12
0
        public ActionResult Edit(Misiones misiones)
        {
            if (ModelState.IsValid)
            {
                db.Entry(misiones).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            var personas = from p in db.Persona
                           where p.activo
                           select new { p.id, nombre = p.nombre + " " + p.apellido1 + " " + (p.apellido2 ?? "") };

            ViewBag.Personaid = new SelectList(personas, "id", "nombre", misiones.Personaid);
            return(View(misiones));
        }
Example #13
0
    // Update is called once per frame
    void Update()
    {
        tiempo          -= Time.deltaTime;
        tiempoAnimacion -= Time.deltaTime;
        if (tiempo < 0)
        {
            tomaMadera = false;
        }
        if (tiempoAnimacion < 0)
        {
            if (playerAnimator != null)
            {
                playerAnimator.SetBool("recojer", false);
                transform.position      = new Vector3(-10, -10, -10);
                MoverMouse.movimiento   = true;
                MoverMouse.cambioCamara = false;
                if (actualizar && General.paso_mision == 1 && General.misionActual[0] == "1")
                {
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                    mision.procesoMision1(General.paso_mision);
                    actualizar = false;
                }
            }
        }

        if (General.misionActual[0] == "1" && General.paso_mision == 1)
        {
        }
        else
        {
            if (General.paso_mision != 1 && General.misionActual[0] == "1")
            {
                Maleta maleta = Camera.main.gameObject.GetComponent <Maleta>();
                maleta.agregarTextura(madera);
            }
            if (playerAnimator != null)
            {
                playerAnimator.SetBool("recojer", false);
            }

            Destroy(gameObject);
        }
    }
Example #14
0
    // Update is called once per frame
    void Update()
    {
        if (tiempo > 0)
        {
            tiempo -= Time.deltaTime;
        }
        if (viaje)
        {
            player.transform.position = trasportar.transform.position;
            MoverMouse.cambioCamara   = false;

            if (tiempo < 1 && tiempo > 0)
            {
                viaje = false;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision3(General.paso_mision);
            }
        }
    }
Example #15
0
    // Update is called once per frame
    void Update()
    {
        if (instanciarVasija)
        {
            GameObject vasijaIns = (GameObject)Instantiate(vasija, player.transform.position, transform.rotation);
            vasijaIns.transform.parent = player.transform;
            vasijaIns.transform.Translate(0.1532699f, -0.3859406f, 0f);
            vasijaIns.transform.rotation = new Quaternion();
            vasijaIns.transform.Rotate(270f, 0f, 0f);
            instanciarVasija = false;
        }

        tiempo          -= Time.deltaTime;
        tiempoAnimacion -= Time.deltaTime;
        if (tiempo < 0)
        {
            if (GameObject.Find("Vasija(Clone)"))
            {
                playerAnimator.SetBool("recojer", false);
                Destroy(GameObject.Find("Vasija(Clone)"));
            }

            if (tiempoAnimacion < 0 && tomabarro)
            {
                MoverMouse.movimiento   = true;
                MoverMouse.cambioCamara = false;
                if (actualizar && General.paso_mision == 6 && General.misionActual[0] == "1")
                {
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones>();
                    mision.procesoMision1(General.paso_mision);
                    actualizar = false;
                }
            }
            tomabarro = false;
        }

        if (cargarMaleta)
        {
            Maleta maleta = Camera.main.gameObject.GetComponent <Maleta>();
            maleta.agregarTextura(contenidobarro);
            cargarMaleta = false;
        }
    }
Example #16
0
    // Update is called once per frame
    void Update()
    {
        tiempo -= Time.deltaTime;
        if (tiempo < 0 && inciarTiempo)
        {
            player.transform.position = llegada.transform.position;

            if (General.misionActual [0] == "1" && General.paso_mision == 2)
            {
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision1(General.paso_mision);
            }
            else if (General.misionActual [0] == "1" && General.paso_mision == 4 && llegada.name == "PlayerJuego")
            {
                General.timepo      = 20;
                General.timepoChia  = 20.5f;
                Misiones.instanciar = true;
            }
            else if (General.misionActual [0] == "1" && General.paso_mision == 4 && llegada.name == "pasca")
            {
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision1(General.paso_mision);
            }
            else if (General.misionActual [0] == "1" && General.paso_mision == 6 && llegada.name == "PlayerJuego")
            {
                General.timepo      = 10;
                General.timepoChia  = 10.5f;
                Misiones.instanciar = true;
            }

            inciarTiempo            = false;
            MoverMouse.movimiento   = true;
            MoverMouse.cambioCamara = false;

            efecto.SetActive(false);
        }

        if (tiempo > 0 && tiempo < 1)
        {
            animator.SetBool("transportador", false);
        }
    }
Example #17
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 2)
            {
                if (tiempo > 18)
                {
                    mensaje = "Bienvenido a la nueva iglesia, \n " +
                              "esta iglesia fue reconstruida en 1776,";
                }
                else if (tiempo > 12)
                {
                    mensaje = "mostrando la construcción de la nueva ciudad.";
                }
                else if (tiempo > 8)
                {
                    mensaje = "Desde aquí tu comunidad y tu empiezan a tomar \n" +
                              "la religión católica";
                }
                else if (tiempo > 0)
                {
                    mensaje = "para ello te entrego esta cruz, \n " +
                              "símbolo de nuestra religión católica.";
                    if (!GameObject.Find("cruz"))
                    {
                        GameObject cruzObj = (GameObject)Instantiate(cruz, transform.position, transform.rotation);
                        cruzObj.transform.parent   = player.transform;
                        cruzObj.transform.rotation = new Quaternion();
                        cruzObj.transform.Rotate(300, 0, 0);
                        cruzObj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                        cruzObj.name = "cruz";
                    }
                }

                if (General.paso_mision == 2 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("cruz"))
                    {
                        Destroy(GameObject.Find("cruz"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else
            {
                mensaje = "Bienvenido a la nueva iglesia.";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 3, Screen.height / 24), "Antonio Martinez (Cura)");
            MoverMouse.movimiento = true;
        }
    }
Example #18
0
    void OnGUI()
    {
        GameObject reja = GameObject.Find("Reja");

        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            switch (General.paso_mision)
            {
            case 2:
                if (tiempo > 20)
                {
                    if (voz.clip.name != g1.name)
                    {
                        voz.clip = g1;
                        voz.Play();
                    }
                    mensaje = "Bienvenidos a Altagracia de Sumapaz,";
                }
                else if (tiempo > 15)
                {
                    if (voz.clip.name != g2.name)
                    {
                        voz.clip = g2;
                        voz.Play();
                    }
                    mensaje = "para poder hablar con el virrey, debes traer un tributo.";
                }
                else if (tiempo > 8)
                {
                    mensaje = "He observado que traes tu tributo";
                }
                else if (tiempo > 0)
                {
                    if (voz.clip.name != g4.name)
                    {
                        voz.clip = g4;
                        voz.Play();
                    }
                    mensaje = "podéis pasar, sean respetuosos con su virrey";
                    reja.transform.Translate(0.01f, 0, 0);
                }
                break;

            case 3:
                if (voz.clip.name != g0.name)
                {
                    voz.clip = g0;
                    voz.Play();
                }
                mensaje = "Recuerda que debes unirte con otros compañeros y completar \n" +
                          "tres tributos. Así podrán hablar con el virrey. ";
                break;

            case 4:
                if (tiempo > 8)
                {
                    mensaje = "He observado que traen sus tributos";
                }
                else if (tiempo > 1)
                {
                    if (voz.clip.name != g4.name)
                    {
                        voz.clip = g4;
                        voz.Play();
                    }
                    mensaje = "podéis pasar, sean respetuosos con su virrey";
                    //GameObject.Find ("puerta").GetComponent<BoxCollider> ().isTrigger = true;
                }
                if (reja.transform.localPosition.z < 4.1f)
                {
                    reja.transform.Translate(0.01f, 0, 0);
                }

                break;
            }

            if (tiempo > 0 && General.paso_mision >= 5 && reja.transform.localPosition.z < 4.1f)
            {
                reja.transform.Translate(0.02f, 0, 0);
            }
            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            if (General.paso_mision == 2 && General.misionActual [0] == "2" && tiempo < 0.5)
            {
                //General.timepo = 10;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision2(General.paso_mision);
                tiempo = 0;
            }

            if (General.paso_mision == 4 && General.misionActual [0] == "2" && tiempo < 0.5)
            {
                //General.timepo = 10;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision2(General.paso_mision);
            }
            MoverMouse.movimiento = true;
        }
    }
Example #19
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 4)
            {
                if (tiempo > 15)
                {
                    mensaje = "Bienvenido a la quinta de Balmoral. " +
                              "\n Construida en 1870.";
                }
                else if (tiempo > 10)
                {
                    mensaje = "Aquí se realizaron grandes reuniones para crear" +
                              "\n las leyes de 1886 en nuestro país que \n" +
                              "rigen actualmente.";
                }
                else if (tiempo > 8)
                {
                    mensaje = "Para continuar,";
                }
                else if (tiempo > 0)
                {
                    mensaje = "debes llevar estos artículos para que \n" +
                              "sean firmados y publicados.";
                    if (!GameObject.Find("articulos"))
                    {
                        GameObject Obj = (GameObject)Instantiate(articulos, transform.position, transform.rotation);
                        Obj.transform.parent   = player.transform;
                        Obj.transform.rotation = new Quaternion();
                        Obj.transform.Rotate(270, 180, 0);
                        Obj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                        Obj.name = "articulos";
                    }
                }

                if (General.paso_mision == 4 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("articulos"))
                    {
                        Destroy(GameObject.Find("articulos"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else
            {
                mensaje = "Bienvenido a la quinta de Balmoral.";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 3, Screen.height / 24), "Enrique Olaya Herrera");

            MoverMouse.movimiento = true;
        }
    }
Example #20
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 9)
            {
                if (tiempo > 19)
                {
                    mensaje = "Bienvenido, esta es la casona la venta, \n ";
                }
                else if (tiempo > 10)
                {
                    mensaje = "aquí estoy realizando varias investigaciones sobre la fauna\n" +
                              "del Sumapaz. Me ha llegado información de que \n" +
                              "Alfonso López está enfermo";
                }
                else if (tiempo > 6)
                {
                    mensaje = "y no ha podido publicar las leyes \n " +
                              "Llévale esta planta,";
                    if (!GameObject.Find("quina"))
                    {
                        GameObject cruzObj = (GameObject)Instantiate(quina, transform.position, transform.rotation);
                        cruzObj.transform.parent   = player.transform;
                        cruzObj.transform.rotation = new Quaternion();
                        cruzObj.transform.Rotate(300, 0, 0);
                        cruzObj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                        cruzObj.name = "quina";
                    }
                }
                else if (tiempo > 0.5)
                {
                    mensaje = "se llama Quina, es muy usada como medicina. " +
                              "\n Ve rápido, no te demores mucho.";
                }

                if (General.paso_mision == 9 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("quina"))
                    {
                        Destroy(GameObject.Find("quina"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else
            {
                mensaje = "Bienvenido a la Casona la Venta.";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 3, Screen.height / 24), "Jose Celestino Mutis");

            MoverMouse.movimiento = true;
        }
    }
Example #21
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 6)
            {
                if (tiempo > 40)
                {
                    if (voz.clip.name != b1.name)
                    {
                        voz.clip = b1;
                        voz.Play();
                    }
                    mensaje = "Bienvenidos amigos míos, os recibo el permiso de vuestro\n " +
                              "virrey para poder entregarles las llaves de su casa.";
                    if (!GameObject.Find("permiso") && tiempo < 44)
                    {
                        GameObject permisoObj = (GameObject)Instantiate(permiso, transform.position, transform.rotation);
                        permisoObj.transform.parent   = player.transform;
                        permisoObj.transform.rotation = new Quaternion();
                        permisoObj.transform.Rotate(300, 0, 0);
                        permisoObj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                        permisoObj.transform.localScale    = new Vector3(0.5f, 0.5f, 0.5f);
                        permisoObj.name = "permiso";
                    }
                }
                else if (tiempo > 35)
                {
                    if (voz.clip.name != b2.name)
                    {
                        voz.clip = b2;
                        voz.Play();
                    }
                    mensaje = "Aquí fundaremos un nuevo pueblo llamado Fusagasugá.";
                }
                else if (tiempo > 30)
                {
                    if (voz.clip.name != b3.name)
                    {
                        voz.clip = b3;
                        voz.Play();
                    }
                    mensaje = "Muy bien, aquí está su casa, ya podéis habitar \n" +
                              "en esta humilde morada.";
                    if (!GameObject.Find("llave"))
                    {
                        GameObject llaveObj = (GameObject)Instantiate(llave, bernardino.transform.position, transform.rotation);
                        llaveObj.transform.parent        = player.transform;
                        llaveObj.transform.localPosition = new Vector3(2.14f, 0.84f, 2.08f);
                        llaveObj.name = "llave";
                    }
                }
                else if (tiempo > 25)
                {
                    if (GameObject.Find("llave"))
                    {
                        Destroy(GameObject.Find("permiso"));
                        Destroy(GameObject.Find("llave"));
                    }
                    if (voz.clip.name != b4.name)
                    {
                        voz.clip = b4;
                        voz.Play();
                    }
                    mensaje = "Tu casa, así como las de su alrededor, \n " +
                              "se ha construido con los siguientes materiales:";
                }
                else if (tiempo > 20)
                {
                    if (voz.clip.name != b5.name)
                    {
                        voz.clip = b5;
                        voz.Play();
                    }
                    mensaje = "Ladrillo de Adobe, la cual sirve como pared de nuestras casas";
                }
                else if (tiempo > 15)
                {
                    if (voz.clip.name != b6.name)
                    {
                        voz.clip = b6;
                        voz.Play();
                    }
                    mensaje = "Teja de barro, la que nos protege de la lluvia";
                }
                else if (tiempo > 10)
                {
                    if (voz.clip.name != b7.name)
                    {
                        voz.clip = b7;
                        voz.Play();
                    }
                    mensaje = "Piedra como cimiento, la que sostendrá nuestra casa \n" +
                              "sin que se derrumbe";
                }
                else if (tiempo > 5)
                {
                    if (voz.clip.name != b8.name)
                    {
                        voz.clip = b8;
                        voz.Play();
                    }
                    mensaje = "Madera, Usada como marcos de las ventanas y puertas, \n" +
                              "además de ayudar a adornar tu casa.";
                }

                if (General.paso_mision == 6 && General.misionActual [0] == "2" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision2(General.paso_mision);
                }
            }
            else if (General.paso_mision < 6)
            {
                if (voz.clip.name != b0.name)
                {
                    voz.clip = b0;
                    voz.Play();
                }
                mensaje = "Recuerda que fundaremos un nuevo pueblo, pero primero debes ir\n" +
                          "donde el virrey que se encuentra en Altagracia de Sumapaz y traerme\n" +
                          "un permiso, y así poder darte las llaves de tu humilde morada.";
            }
            else
            {
                mensaje = "Ve a tu casa, y resguárdate de esta terrible tormenta";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(18.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 3, Screen.height / 24), "Gonzalo Jimenez de Quesada");

            MoverMouse.movimiento = true;
        }
    }
Example #22
0
 // Start is called before the first frame update
 void Start()
 {
     miss      = FindObjectOfType <Misiones>();
     healthBar = FindObjectOfType <HealthBar>();
     playerM   = FindObjectOfType <PlayerMove>();
 }
Example #23
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            switch (General.paso_mision)
            {
            case 5:
                if (tiempo > 16)
                {
                    mensaje = "Bienvenidos a Altagracia de Sumapaz,";

                    if (voz.clip.name != v1.name)
                    {
                        voz.clip = v1;
                        voz.Play();
                    }
                }
                else if (tiempo > 11)
                {
                    if (voz.clip.name != v2.name)
                    {
                        voz.clip = v2;
                        voz.Play();
                    }
                    mensaje = "he aquí recibo sus tributos y te entrego este permiso.";
                    if (!GameObject.Find("pieza0"))
                    {
                        GameObject pieza = (GameObject)Instantiate(premio, virrey.transform.position, transform.rotation);
                        pieza.transform.parent   = virrey.transform;
                        pieza.transform.rotation = new Quaternion();
                        pieza.transform.Rotate(0, 265, 0);
                        pieza.transform.localPosition = new Vector3(2f, 0f, 0f);
                        pieza.name = "pieza0";

                        Maleta maleta = Camera.main.gameObject.GetComponent <Maleta>();
                        maleta.eliminarTextura("premio");
                    }
                    else
                    {
                        GameObject.Find("pieza0").transform.Rotate(0f, -10f * Time.deltaTime, 0f);

                        if (!GameObject.Find("permiso"))
                        {
                            GameObject permisoObj = (GameObject)Instantiate(permiso, virrey.transform.position, transform.rotation);
                            permisoObj.transform.parent   = virrey.transform;
                            permisoObj.transform.rotation = new Quaternion();
                            permisoObj.transform.Rotate(300f, 180f, 0f);
                            permisoObj.transform.localPosition = new Vector3(-2f, 0f, 0f);
                            permisoObj.name = "permiso";
                        }
                    }
                }
                else if (tiempo > 5)
                {
                    if (voz.clip.name != v3.name)
                    {
                        voz.clip = v3;
                        voz.Play();
                    }
                    mensaje = "Llevadlo a Bernardino de Albornoz que se encuentra en";
                    GameObject.Find("pieza0").transform.Translate(0.01f, 0, 0);
                    GameObject.Find("permiso").transform.Translate(-0.01f, 0, 0);
                }
                else if (tiempo > 1)
                {
                    mensaje = "Fusagasugá, y entregadlo. Él les dirá que hacer.";
                }
                break;
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 4, Screen.height / 24), "Virrey");

            if (General.paso_mision == 5 && General.misionActual [0] == "2" && tiempo < 0.5)
            {
                //General.timepo = 10;
                //Misiones mision = Camera.main.gameObject.GetComponent<Misiones> ();
                //mision.procesoMision2 (General.paso_mision);
                Destroy(GameObject.Find("pieza0"));
                Destroy(GameObject.Find("permiso"));
                Maleta maleta = Camera.main.gameObject.GetComponent <Maleta>();
                maleta.agregarTextura(premioTextura);
                iniciarConversasion = false;
                Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                mision.procesoMision2(General.paso_mision);
            }

            MoverMouse.movimiento = true;
        }
    }
Example #24
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 6)
            {
                if (voz.clip.name != r1.name)
                {
                    voz.clip = r1;
                    voz.Play();
                }
                if (tiempo > 13)
                {
                    mensaje = "Bienvenido a esta nueva ciudad.";
                }
                else if (tiempo > 8)
                {
                    mensaje = "Te recibo el título de propiedad y 30 monedas\n" +
                              "de oro de impuestos de tu casa.";

                    if (!GameObject.Find("titulo"))
                    {
                        General.monedas -= 30;
                        GameObject permisoObj = (GameObject)Instantiate(titulo, transform.position, transform.rotation);
                        permisoObj.transform.parent   = player.transform;
                        permisoObj.transform.rotation = new Quaternion();
                        permisoObj.transform.Rotate(300, 0, 0);
                        permisoObj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                        permisoObj.transform.localScale    = new Vector3(0.5f, 0.5f, 0.5f);
                        permisoObj.name = "titulo";
                    }
                }
                else if (tiempo > 0)
                {
                    mensaje = "Gracias, te entrego las llaves de tu nuevo hogar, " +
                              "\n tu casa la puedes encontrar en las casas que \n" +
                              "ves al lado de nosotros. Ve y encuéntrala.";

                    if (!GameObject.Find("llave"))
                    {
                        GameObject llaveObj = (GameObject)Instantiate(llave, recaudador_game.transform.position, transform.rotation);
                        llaveObj.transform.parent        = player.transform;
                        llaveObj.transform.localPosition = new Vector3(2.14f, 0.84f, 2.08f);
                        llaveObj.name = "llave";
                    }
                }

                if (General.paso_mision == 6 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("llave"))
                    {
                        Destroy(GameObject.Find("titulo"));
                        Destroy(GameObject.Find("llave"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else if (General.paso_mision == 10)
            {
                if (voz.clip.name != r2.name)
                {
                    voz.clip = r2;
                    voz.Play();
                }
                mensaje = "Gracias, Alfonso te envía este regalo por ayudarle.";
                if (!GameObject.Find("cafe"))
                {
                    General.monedas -= 30;
                    GameObject quinaobj = (GameObject)Instantiate(quina, transform.position, transform.rotation);
                    quinaobj.transform.parent   = player.transform;
                    quinaobj.transform.rotation = new Quaternion();
                    quinaobj.transform.Rotate(300, 0, 0);
                    quinaobj.transform.localPosition = new Vector3(-0.95f, 0.5858f, 2.3f);
                    quinaobj.name = "quina";

                    GameObject cafeObj = (GameObject)Instantiate(cafe, recaudador_game.transform.position, transform.rotation);
                    cafeObj.transform.parent        = player.transform;
                    cafeObj.transform.localPosition = new Vector3(2.14f, 0f, 2.08f);
                    cafeObj.name = "cafe";
                }

                if (General.paso_mision == 10 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("cafe"))
                    {
                        Destroy(GameObject.Find("quina"));
                        Destroy(GameObject.Find("cafe"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else
            {
                mensaje = "Hola, bienvenido a Fusagasugá";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 4, Screen.height / 24), "Recaudador");

            MoverMouse.movimiento = true;
        }
    }
Example #25
0
    void OnGUI()
    {
        if (iniciarConversasion && player.GetComponent <NetworkView> ().isMine)
        {
            if (General.paso_mision == 5)
            {
                if (tiempo > 15)
                {
                    mensaje = "Bienvenido a este lugar\n ";
                }
                else if (tiempo > 10)
                {
                    mensaje = "os recibo los artículos que Don \n" +
                              "Enrique me envió contigo.";
                    if (!GameObject.Find("articulos"))
                    {
                        GameObject obj = (GameObject)Instantiate(articulos, player.transform.position, transform.rotation);
                        obj.transform.parent   = player.transform;
                        obj.transform.rotation = new Quaternion();
                        obj.transform.Rotate(270, 180, 0);
                        obj.transform.localPosition = new Vector3(2f, 0.2f, 3f);
                        obj.name = "articulos";
                    }
                }
                else if (tiempo > 8)
                {
                    mensaje = "Gracias. Por este favor, te entrego \n" +
                              "este título de propiedad.";
                    if (!GameObject.Find("titulo"))
                    {
                        GameObject permisoObj = (GameObject)Instantiate(titulo, player.transform.position, transform.rotation);
                        permisoObj.transform.parent   = player.transform;
                        permisoObj.transform.rotation = new Quaternion();
                        permisoObj.transform.Rotate(300, 0, 0);
                        permisoObj.transform.localPosition = new Vector3(-2.25f, 0.2f, 3f);
                        permisoObj.name = "titulo";
                        Destroy(GameObject.Find("articulos"));
                    }
                }
                else if (tiempo > 0)
                {
                    mensaje = "Debes ir cerca de la iglesia, hay \n" +
                              "te dirán donde será tu próximo hogar.";
                }

                if (General.paso_mision == 5 && General.misionActual [0] == "3" && tiempo < 0.5)
                {
                    //General.timepo = 10;
                    if (GameObject.Find("titulo"))
                    {
                        Destroy(GameObject.Find("titulo"));
                    }
                    iniciarConversasion = false;
                    Misiones mision = Camera.main.gameObject.GetComponent <Misiones> ();
                    mision.procesoMision3(General.paso_mision);
                }
            }
            else if (General.paso_mision != 10)
            {
                mensaje = "Bienvenido a mi casa Coburgo.";
            }

            GUIStyle style = new GUIStyle();
            style.alignment = TextAnchor.MiddleCenter;
            style           = GUI.skin.GetStyle("Box");
            style.fontSize  = (int)(20.0f);

            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4, 2 * (Screen.width / 3), Screen.height / 4), mensaje);

            style.fontSize = (int)(15.0f);
            GUI.Box(new Rect(Screen.width / 10, 3 * Screen.height / 4 - Screen.height / 24, Screen.width / 3, Screen.height / 24), "Alfonso Lopez Pumarejo");

            MoverMouse.movimiento = true;
        }
    }