Exemple #1
0
    IEnumerator CargarEscena()
    {
        SDialogManager.skipAllCurrentDialogs();
        Debug.Log("Cargando escena " + this.name);
        textoCargando.gameObject.SetActive(true);
        yield return(new WaitForEndOfFrame());

        Application.LoadLevel(this.name);
    }
Exemple #2
0
    IEnumerator runDialogs()
    {
        yield return(new WaitForSeconds(delayBeforeStart));

        foreach (ASDialog d in dialogs)
        {
            SDialogManager.displayDialog(d);
        }
    }
Exemple #3
0
    public bool appearSkip  = false;    // skips the appear anim (checked by SDialogManager)

    void OnMouseUpAsButton()
    {
        if (textShown == true)                   // already shown the text in full
        {
            SDialogManager.callNextDialog(true); // calls the next dialog (if any) *Manager will destroy this controller
        }
        else if (textShowing == false)           // not yet showing text (likely still appearing)
        {
            appearSkip = true;                   // skips the appear anim
        }
        else
        {
            textSkip = true;             // skips the text being displayed one-char-at-a-time
        }
    }
Exemple #4
0
    IEnumerator CargarEscena()
    {
        SDialogManager.skipAllCurrentDialogs();
        Debug.Log("Cargando escena " + this.name);
        if (textoCargando)
        {
            textoCargando.gameObject.SetActive(true);
        }
        yield return(new WaitForEndOfFrame());

        //Para cargar a nueva escena se ve si se puede cargar la escena o si se debe cargar la escena del candado
        //tomamos el numero de la escena
        //El numero de la escena debe estar en el nombre del Image Tracker
        int numPagina;

        if (!int.TryParse(this.name[this.name.Length - 1].ToString(), out numPagina))
        {
            Debug.Log("No se conoce el numero de la pagina para cargar el nivel del candado");
        }
        else
        {
            //Si la pagina esta activada cargar la pagina
            if (PaginasManager.Singleton.EstaActivada(numPagina))
            {
                Application.LoadLevel(this.name);
            }
            //Sino, cargar la pagina del candado
            else
            {
                EscenaPaginaLocked.paginaQueSeIntentoCargar = this.name;
                Application.LoadLevel("PaginaLocked");
            }
            yield return(null);
        }
        //Si no se obtuvo el numero de la pagina simplemente no considera la pagina del candado
        Application.LoadLevel(this.name);
        yield return(null);
    }
Exemple #5
0
 // calls the runDialog sequence
 public void execute(bool appearAnim)
 {
     SDialogManager.runDialog(this, appearAnim);
 }