Exemple #1
0
 internal UnresolvedToken(string name, int line, DialogMenu menu, string text)
 {
     Name           = name;
     Line           = line;
     State          = menu;
     Text           = text;
     InsertPosition = Mathf.Max(0, menu.Items.Count - 1);
 }
Exemple #2
0
        private bool ParseMenu(string arguments)
        {
            // menu MenuName
            LastTopic = null;

            if (string.IsNullOrEmpty(arguments))
            {
                return(false);
            }

            if (DialogObject.States.Dictionary.ContainsKey(arguments))
            {
                Error(string.Format("Menu '{0}' defined twice", arguments));
                return(false);
            }

            LastMenu = Create <DialogMenu>(arguments);
            DialogObject.States.Dictionary[arguments] = LastMenu;

            return(true);
        }
Exemple #3
0
        private bool ParseTopic(string arguments)
        {
            // topic TopicName
            LastMenu = null;

            if (string.IsNullOrEmpty(arguments))
            {
                return(false);
            }

            if (DialogObject.States.Dictionary.ContainsKey(arguments))
            {
                Error(string.Format("Topic '{0}' defined twice", arguments));
                return(false);
            }

            LastTopic      = ScriptableObject.CreateInstance <DialogTopic>();
            LastTopic.name = arguments;
            DialogObject.States.Dictionary[arguments] = LastTopic;
            AddToAsset(LastTopic);

            return(true);
        }