private static void InitUserData(string localId, string name) { SaveSystem.InitPlayer(localId, name); ItemDatabase.InitSetting(); HeroDatabase.InitSetting(); AbilityDatabase.InitSetting(); SkillDatabase.InitSetting(); MissionDatabase.InitSetting(); MapDatabase.InitSetting(); SaveData(); }
public static void LoadMap() { maps.Clear(); userMaps.Clear(); string path = Application.persistentDataPath + "/Xml/Map.Xml"; MapDatabase md = null; MapDatabase userMd = null; if (System.IO.File.Exists(path)) { md = MapDatabase.Load(); userMd = MapDatabase.LoadUser(); } else { md = MapDatabase.InitSetting(); userMd = MapDatabase.LoadUser(); } if (md != null) { foreach (Map map in md.maps) { maps.Add(map); } } if (userMd != null) { foreach (Map map in userMd.maps) { userMaps.Add(map); } } if (maps != null && userMaps != null) { Debugging.LogSystem("MapDatabase is loaded Succesfully."); } }