コード例 #1
0
ファイル: DialogDatabase.cs プロジェクト: KraigXu/GameProject
 private static void LoadAllDialog()
 {
     Nodes.Clear();
     Object[] array = Resources.LoadAll("Dialog", typeof(TextAsset));
     Log.Message(">>" + "Dialog");
     foreach (Object @object in array)
     {
         TextAsset ass = @object as TextAsset;
         if (@object.name == "BaseEncounters" || @object.name == "GeneratedDialogs")
         {
             LayerLoader.LoadFileIntoList(ass, Nodes, NodeLists, DiaNodeType.BaseEncounters);
         }
         if (@object.name == "InsanityBattles")
         {
             LayerLoader.LoadFileIntoList(ass, Nodes, NodeLists, DiaNodeType.InsanityBattles);
         }
         if (@object.name == "SpecialEncounters")
         {
             LayerLoader.LoadFileIntoList(ass, Nodes, NodeLists, DiaNodeType.Special);
         }
     }
     foreach (DiaNodeMold node in Nodes)
     {
         node.PostLoad();
     }
     LayerLoader.MarkNonRootNodes(Nodes);
 }
コード例 #2
0
ファイル: LayerLoader.cs プロジェクト: wensincai/RW-Decompile
 public static void MarkNonRootNodes(List <DiaNodeMold> NodeList)
 {
     foreach (DiaNodeMold current in NodeList)
     {
         LayerLoader.RecursiveSetIsRootFalse(current);
     }
     foreach (DiaNodeMold current2 in NodeList)
     {
         foreach (DiaNodeMold current3 in NodeList)
         {
             foreach (DiaOptionMold current4 in current3.optionList)
             {
                 bool flag = false;
                 foreach (string current5 in current4.ChildNodeNames)
                 {
                     if (current5 == current2.name)
                     {
                         flag = true;
                     }
                 }
                 if (flag)
                 {
                     current2.isRoot = false;
                 }
             }
         }
     }
 }
コード例 #3
0
 private static void LoadAllDialog()
 {
     DialogDatabase.Nodes.Clear();
     UnityEngine.Object[] array = Resources.LoadAll("Dialog", typeof(TextAsset));
     foreach (UnityEngine.Object @object in array)
     {
         TextAsset ass = @object as TextAsset;
         if (@object.name == "BaseEncounters" || @object.name == "GeneratedDialogs")
         {
             LayerLoader.LoadFileIntoList(ass, DialogDatabase.Nodes, DialogDatabase.NodeLists, DiaNodeType.BaseEncounters);
         }
         if (@object.name == "InsanityBattles")
         {
             LayerLoader.LoadFileIntoList(ass, DialogDatabase.Nodes, DialogDatabase.NodeLists, DiaNodeType.InsanityBattles);
         }
         if (@object.name == "SpecialEncounters")
         {
             LayerLoader.LoadFileIntoList(ass, DialogDatabase.Nodes, DialogDatabase.NodeLists, DiaNodeType.Special);
         }
     }
     foreach (DiaNodeMold diaNodeMold in DialogDatabase.Nodes)
     {
         diaNodeMold.PostLoad();
     }
     LayerLoader.MarkNonRootNodes(DialogDatabase.Nodes);
 }
コード例 #4
0
 public static void MarkNonRootNodes(List <DiaNodeMold> NodeList)
 {
     foreach (DiaNodeMold d in NodeList)
     {
         LayerLoader.RecursiveSetIsRootFalse(d);
     }
     foreach (DiaNodeMold diaNodeMold in NodeList)
     {
         foreach (DiaNodeMold diaNodeMold2 in NodeList)
         {
             foreach (DiaOptionMold diaOptionMold in diaNodeMold2.optionList)
             {
                 bool flag = false;
                 foreach (string a in diaOptionMold.ChildNodeNames)
                 {
                     if (a == diaNodeMold.name)
                     {
                         flag = true;
                     }
                 }
                 if (flag)
                 {
                     diaNodeMold.isRoot = false;
                 }
             }
         }
     }
 }
コード例 #5
0
 public static void MarkNonRootNodes(List <DiaNodeMold> NodeList)
 {
     foreach (DiaNodeMold Node in NodeList)
     {
         LayerLoader.RecursiveSetIsRootFalse(Node);
     }
     foreach (DiaNodeMold Node2 in NodeList)
     {
         foreach (DiaNodeMold Node3 in NodeList)
         {
             foreach (DiaOptionMold option in Node3.optionList)
             {
                 bool flag = false;
                 foreach (string childNodeName in option.ChildNodeNames)
                 {
                     if (childNodeName == Node2.name)
                     {
                         flag = true;
                     }
                 }
                 if (flag)
                 {
                     Node2.isRoot = false;
                 }
             }
         }
     }
 }
コード例 #6
0
ファイル: LayerLoader.cs プロジェクト: wensincai/RW-Decompile
 private static void RecursiveSetIsRootFalse(DiaNodeMold d)
 {
     foreach (DiaOptionMold current in d.optionList)
     {
         foreach (DiaNodeMold current2 in current.ChildNodes)
         {
             current2.isRoot = false;
             LayerLoader.RecursiveSetIsRootFalse(current2);
         }
     }
 }
コード例 #7
0
 private static void RecursiveSetIsRootFalse(DiaNodeMold d)
 {
     foreach (DiaOptionMold diaOptionMold in d.optionList)
     {
         foreach (DiaNodeMold diaNodeMold in diaOptionMold.ChildNodes)
         {
             diaNodeMold.isRoot = false;
             LayerLoader.RecursiveSetIsRootFalse(diaNodeMold);
         }
     }
 }
コード例 #8
0
 private static void RecursiveSetIsRootFalse(DiaNodeMold d)
 {
     foreach (DiaOptionMold option in d.optionList)
     {
         foreach (DiaNodeMold childNode in option.ChildNodes)
         {
             childNode.isRoot = false;
             LayerLoader.RecursiveSetIsRootFalse(childNode);
         }
     }
 }