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); }
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); }