Ejemplo n.º 1
0
    public override void OnCursorSelect()
    {
        base.OnCursorSelect();

        int      selectedIndex = pageSelectCursor.selectedIndex;
        MenuPage selectedPage  = menuManager.GetPageOfIndex(selectedIndex);

        menuManager.descriptionBox.text = descriptionText;
        canvasRenderer.SetColor(oldColor);
        selectedPage.gameObject.SetActive(true);
        selectedPage.FocusPage();
        selectedPage.transform.SetSiblingIndex(menuManager.pages.Length);
        if (pageSelectCursor.previousSelectedIndex > pageSelectCursor.selectedIndex)
        {
            selectedPage.animator.SetTrigger("TurnRight");
        }
        else if (pageSelectCursor.previousSelectedIndex < pageSelectCursor.selectedIndex)
        {
            selectedPage.animator.SetTrigger("TurnLeft");
        }
    }