Example #1
0
    public IEnumerator ActivateRoutine(RogueUI ui, PCEvent pc, int level)
    {
        this.pc = pc;
        this.ui = ui;

        rightFace.hpBar.gameObject.SetActive(false);
        rightFace.mpBar.gameObject.SetActive(false);
        rightFace.cdBar.gameObject.SetActive(false);

        PopulateBookData();
        bookBox.Populate(bookData);
        bookBox.selection = 0;
        PopulateScrollBoxForSelectedBook();

        levelText.text = "Cleared floor " + level + " with " + pc.gold + " gold. " +
                         "Craft spellbooks and challenge next floor! Press [ESC] when done.";
        PopulateTools();

        textbox.textbox.GetComponent <CanvasGroup>().alpha = 1.0f;

        ui.rightDisplayEnabled = true;
        UpdateDescriptionForSelectedBook();
        yield return(CoUtils.RunTween(GetComponent <CanvasGroup>().DOFade(1.0f, 1.0f)));

        yield return(textbox.EnableRoutine(null, false));

        descriptionNameBox.transform.parent.GetComponent <CanvasGroup>().alpha = 1.0f;
        yield return(SelectBookRoutine());
    }