예제 #1
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;
        }
    }
예제 #2
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);
            }
        }
    }
예제 #3
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;
             }
         }
     }
 }
예제 #4
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;
        }
    }
예제 #5
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;
        }
    }
예제 #6
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;
        }
    }