Пример #1
0
    //UI调用
    public void UISelID()
    {
        int    tempID = int.Parse(textID.text.Trim());
        CSVRow tmpRow = StoryRelationTab._instance().GetRowFromID(tempID);

        if (tmpRow != null)
        {
            textNextID.text   = tmpRow.GetString(StoryRelationTab.csNextID);
            uiEffect.value    = tmpRow.GetInt(StoryRelationTab.csUISort);
            roleSay.value     = tmpRow.GetInt(StoryRelationTab.csIsRoleSay);
            BgChange.value    = tmpRow.GetInt(StoryRelationTab.csNeedChangeBg);
            isAutoSave.value  = tmpRow.GetInt(StoryRelationTab.csIsAutoSave);
            isKeyOption.value = tmpRow.GetInt(StoryRelationTab.csIsKeySave);
            textCn.text       = tmpRow.GetString(StoryRelationTab.csContentCN);
            textEn.text       = tmpRow.GetString(StoryRelationTab.csContentEn);
        }
    }
Пример #2
0
    //显示剧情内容
    public void showContentText(int nowStoryid)
    {
        storyID = nextStoryID;

        CSVRow tmpRow = StoryRelationTab._instance().GetRowFromID(nowStoryid);
        string msg    = tmpRow.GetString(StoryRelationTab.csContentCN);

        ContentText.text = stringReplace(msg);

        //是否自动保存
        int isAutoSave = tmpRow.GetInt(StoryRelationTab.csIsAutoSave);

        if (isAutoSave == 1)
        {
            autoSaveData.instance().saveData(storyID);
        }

        nextStoryID = tmpRow.GetInt(StoryRelationTab.csNextID);
        if (nextStoryID == 0)   //出现选项的剧情
        {
            showTalkSel(nowStoryid);
        }

        int tmpIsRoleSay = tmpRow.GetInt(StoryRelationTab.csIsRoleSay);

        if (tmpIsRoleSay == 1) //角色说的话
        {
            //判断角色是否发生改变
        }
        else   //背景傍白
               //角色头像是否要隐蔽
        {
        }

        int tmpIsChangeBgScene = tmpRow.GetInt(StoryRelationTab.csNeedChangeBg);

        if (tmpIsChangeBgScene == 1) //场景需要切换
        {
            showBgScene(nowStoryid);
        }
    }