Exemple #1
0
        public DiaNodeMold RandomLinkNode()
        {
            List <DiaNodeMold> list = this.ChildNodes.ListFullCopy <DiaNodeMold>();

            foreach (string nodeName in this.ChildNodeNames)
            {
                list.Add(DialogDatabase.GetNodeNamed(nodeName));
            }
            foreach (DiaNodeMold diaNodeMold in list)
            {
                if (diaNodeMold.unique && diaNodeMold.used)
                {
                    list.Remove(diaNodeMold);
                }
            }
            DiaNodeMold result;

            if (list.Count == 0)
            {
                result = null;
            }
            else
            {
                result = list.RandomElement <DiaNodeMold>();
            }
            return(result);
        }
        public DiaNodeMold RandomNodeFromList()
        {
            List <DiaNodeMold> list = this.Nodes.ListFullCopy <DiaNodeMold>();

            foreach (string current in this.NodeNames)
            {
                list.Add(DialogDatabase.GetNodeNamed(current));
            }
            foreach (DiaNodeMold current2 in list)
            {
                if (current2.unique && current2.used)
                {
                    list.Remove(current2);
                }
            }
            return(list.RandomElement <DiaNodeMold>());
        }
        public DiaNodeMold RandomNodeFromList()
        {
            List <DiaNodeMold> list = Nodes.ListFullCopy();

            foreach (string nodeName in NodeNames)
            {
                list.Add(DialogDatabase.GetNodeNamed(nodeName));
            }
            foreach (DiaNodeMold item in list)
            {
                if (item.unique && item.used)
                {
                    list.Remove(item);
                }
            }
            return(list.RandomElement());
        }
Exemple #4
0
        public DiaNodeMold RandomNodeFromList()
        {
            List <DiaNodeMold> list = this.Nodes.ListFullCopy <DiaNodeMold>();

            foreach (string nodeName in this.NodeNames)
            {
                list.Add(DialogDatabase.GetNodeNamed(nodeName));
            }
            foreach (DiaNodeMold diaNodeMold in list)
            {
                if (diaNodeMold.unique && diaNodeMold.used)
                {
                    list.Remove(diaNodeMold);
                }
            }
            return(list.RandomElement <DiaNodeMold>());
        }
Exemple #5
0
        public DiaNodeMold RandomLinkNode()
        {
            List <DiaNodeMold> list = this.ChildNodes.ListFullCopy();

            foreach (string childNodeName in this.ChildNodeNames)
            {
                list.Add(DialogDatabase.GetNodeNamed(childNodeName));
            }
            foreach (DiaNodeMold item in list)
            {
                if (item.unique && item.used)
                {
                    list.Remove(item);
                }
            }
            if (list.Count == 0)
            {
                return(null);
            }
            return(list.RandomElement());
        }
 static DialogDatabase()
 {
     DialogDatabase.Nodes     = new List <DiaNodeMold>();
     DialogDatabase.NodeLists = new List <DiaNodeList>();
     DialogDatabase.LoadAllDialog();
 }
Exemple #7
0
 static DialogDatabase()
 {
     DialogDatabase.LoadAllDialog();
 }