Пример #1
0
        private void RemoveNodesWithCharacter(DS_Character character)
        {
            Stack <int> nodes_to_remove = GetNodesToRemove(character);

            foreach (int node in nodes_to_remove)
            {
                node_sequence.RemoveAt(node);
            }
        }
Пример #2
0
        private Stack <int> GetNodesToRemove(DS_Character character)
        {
            Stack <int>         nodes = new Stack <int>();
            DS_ConversationNode node;

            for (int _node = 0; _node < node_sequence.Count; ++_node)
            {
                node = node_sequence[_node];
                if (node.character == character)
                {
                    nodes.Push(_node);
                }
            }
            return(nodes);
        }
Пример #3
0
 public void AddCharacter(DS_Character character)
 {
     if (character == null)
     {
         return;
     }
     if (characters.Count >= 10)
     {
         return;
     }
     if (characters.Contains(character))
     {
         return;
     }
     characters.Add(character);
 }