Exemplo n.º 1
0
 private void CheckCharacter(ref DialogConfig.Side currentSide, string currentCharacter, string previousCharacter)
 {
     if (previousCharacter != null && currentCharacter != previousCharacter)
     {
         ChangeSide(ref currentSide);
     }
 }
Exemplo n.º 2
0
        private void ReadDialogs(int listNum)
        {
            if (listNum == 0)
            {
                return;
            }
            //file2
            for (int i = 1; i < Lists[listNum].Cells.GetLength(0);)
            {
                if (Tools.Contains(Lists[listNum][i, 0], "dialogue"))
                {
                    //Read Intro Dialog.
                    while (Tools.Contains(Lists[listNum][i, 1], "intro"))
                    {
                        int introCue = file2.Intro.cues.Count;
                        file2.Intro.AddCue(introCue + 1, DialogConfig.Side.Left, Lists[listNum][i, 4], Lists[listNum][i, 2]);
                        i++;
                    }

                    if (Tools.Contains(Lists[listNum][i, 1], "kb") &&
                        (Tools.Contains(Lists[listNum][i, 1], "before") || Tools.Contains(Lists[listNum][i, 1], "after")))
                    {
                        int    kbNum     = Tools.Number(Lists[listNum][i, 1]) - 1;
                        string character = Lists[listNum][i, 2];
                        string text      = Lists[listNum][i, 4];
                        int    cueNum;

                        DialogConfig.Side cSide = DialogConfig.Side.Right;
                        if (CheckCharLeftSide(kbNum, character))
                        {
                            cSide = DialogConfig.Side.Left;
                        }
                        if (Tools.Contains(Lists[listNum][i, 1], "before"))
                        {
                            //Read KBIntro Dialog.
                            cueNum = file2.KBIntro[kbNum].cues.Count;
                            file2.KBIntro[kbNum].AddCue(cueNum + 1, cSide, text, character);
                        }
                        else if (Tools.Contains(Lists[listNum][i, 1], "after"))
                        {
                            //Read KBOutro Dialog.
                            cueNum = file2.KBOutro[kbNum].cues.Count;
                            file2.KBOutro[kbNum].AddCue(cueNum + 1, cSide, text, character);
                        }
                    }
                    //} else if (Tools.Contains(Lists[listNum][i, 0], "offer")) {
                    //Пока в экселе я не находила.
                }
                i++;
            }
        }
Exemplo n.º 3
0
 private void ChangeSide(ref DialogConfig.Side currentSide)
 {
     currentSide = currentSide == DialogConfig.Side.Left ? DialogConfig.Side.Right : DialogConfig.Side.Left;
 }