void OnDisable() { xml.Close(); TowerFileXml.Close(); UIFunction.ClearChild(MapPanel); LocalMessage.SetHandler(null); }
static public void ReadFile() { if (BulletFlySpeed.Count > 0) { return; } XMLFileController file = new XMLFileController(); file.Open(DataFile); file.BeginParentNode(FLY_SPEED); LinkedList <string> child = file.GetChildren(); foreach (string temp in child) { BulletFlySpeed.Add(temp, float.Parse(file.GetValue(temp))); } file.Close(); }