private void SaveAllData(XmlDataContainer dataContainer)
 {
     dataContainer.AddElement(GameManager.Instance.NodesManager.GetXmlData());
     dataContainer.AddElement(GameManager.Instance.LinksManager.GetXmlData());
     dataContainer.AddElement(GameManager.Instance.EnemyContainerManager.GetXmlData());
     dataContainer.AddElement(GameManager.Instance.ArrowsManager.GetXmlData());
 }
 private void LoadAllData(XmlDataContainer dataContainer)
 {
     GameManager.Instance.NodesManager.LoadXmlData(dataContainer);
     GameManager.Instance.LinksManager.LoadXmlData(dataContainer);
     GameManager.Instance.EnemyContainerManager.LoadXmlData(dataContainer);
     GameManager.Instance.ArrowsManager.LoadXmlData(dataContainer);
 }
        public void SaveFile(string fileName)
        {
            string path = FileSavePath + "/" + GetXmlFileName(fileName);

            XmlDataContainer dataContainer = new XmlDataContainer();

            SaveAllData(dataContainer);
            dataContainer.SaveXml(path);
        }
        public void LoadFile(string fileName)
        {
            string path = FileSavePath + "/" + GetXmlFileName(fileName);

            XmlDataContainer dataContainer = new XmlDataContainer();

            dataContainer.ReadXml(path);
            LoadAllData(dataContainer);
        }