Exemple #1
0
        public override bool Compile()
        {
            _bPassed = true;

            if (text != null && text.Length < 5 && !text.StartsWith("$$"))
            {
                _szCompiled = text + " (경고: 너무 짧은 문장!)";
                _bPassed    = true;
            }

            if (_bPassed)
            {
                for (int i = 0; i < dataList.Count; i++)
                {
                    SHDialogSelect sel = (SHDialogSelect)dataList[i];
                    if (!sel.Compile())
                    {
                        _bPassed    = false;
                        _szCompiled = sel.CompiledMessage;
                        break;
                    }
                }
                if (dataList.Count < 1)
                {
                    _bPassed    = false;
                    _szCompiled = "대화문은 반드시 SELECT로 종료되어야 합니다. 이 대화문은 SAY에서 종결되었습니다.";
                }
            }

            return(_bPassed);
        }
Exemple #2
0
        private void ReplaceStringToKey_Select(int nDialogID, SHDialogSelect dialogSelect)
        {
            m_nSaySelectID++;

            dialogSelect.text = "DIALOG_SELECT_TEXT_" + nDialogID.ToString() + "_" + m_nSaySelectID.ToString();

            if (dialogSelect.Say != null)
            {
                ReplaceStringToKey_Say(nDialogID, dialogSelect.Say);
            }
        }
Exemple #3
0
        private void AddStringSelect(SHDialog dialog, SHDialogSelect dialogSelect, ref SHStringXml DialogString)
        {
            m_nSaySelectID++;

            string szKey = "DIALOG_SELECT_TEXT_" + dialog.id.ToString() + "_" + m_nSaySelectID;

            AddString(szKey, dialogSelect.text, ref DialogString);

            if (dialogSelect.Say != null)
            {
                AddStringSay(dialog, dialogSelect.Say, ref DialogString);
            }
        }
Exemple #4
0
        private void ReplaceKeyToString_Select(int nDialogID, SHDialogSelect dialogSelect, SHStringXml DialogString)
        {
            m_nSaySelectID++;

            string szKey = "DIALOG_SELECT_TEXT_" + nDialogID.ToString() + "_" + m_nSaySelectID.ToString();

            if (DialogString.IsValid(szKey))
            {
                dialogSelect.text = DialogString[szKey].ToString();
            }

            if (dialogSelect.Say != null)
            {
                ReplaceKeyToString_Say(nDialogID, dialogSelect.Say, DialogString);
            }
        }
Exemple #5
0
 public void Add(SHDialogSelect i)
 {
     dataList.Add(i);
 }