Exemplo n.º 1
0
Arquivo: thePlot.cs Projeto: BXZR/GAL
//---------------------------------------------------------------------------------------------------//

//-------------------------------剧本树的相关操作------------------------------------------------------//
    //鼠标点击空白部分就意味着galgame要跳转到下一行剧本了
    void moveToNextItem()
    {
        //剧本帧为空就不做操作了
        if (theItemNow == null)
        {
            return;
        }

        //直接跳转的权限高于一切,虽然大多数情况下此项为空
        if (theItemNow.aimPlotItemID > 0)
        {
            theDataController.loadItemForSkip(theItemNow.aimPlotItemID);
            return;
        }

        //如果是一个分支节点
        if (theItemNow.isASpitRoot())
        {
            //print ("这是一个分支节点,有待选择");
            //进入选择界面,在这里不标明要走哪一条路线,在UI选择的时候才会真的有所选择
            theChoiceController.openSelect(theItemNow.getChilds());
            //可选功能,在选择的时候关闭文本框
            //theTextController.shutTEXT ();
        }
        else
        {
            //如果是死亡场景,就直接进入道场
            if (DeathFile.setDead(theItemNow.ThePlotItemID.ToString()))
            {
                UnityEngine.SceneManagement.SceneManager.LoadScene("DeadScene");                 //进入到死亡道场
            }
            else
            {
                //theTextController.openTEXT ();
                theItemNow = theItemNow.moveToNext();
                //如果是回忆就需要检查一下是不是完事了
                if (systemInformations.isScene && theItemNow.ThePlotItemID > systemInformations.SceneEndIndex)
                {
                    UnityEngine.SceneManagement.SceneManager.LoadScene("start");                     //直接返回到开始界面
                }
                else
                {
                    playTheItem(theItemNow);
                }
            }
        }
    }