/**** Spawn Points Manager Methods ****/ public static void SaveSpawnPointsManager(SpawnPointManager spawnPointManager) { BinaryFormatter bf = new BinaryFormatter(); FileStream fStream = new FileStream(SpawnPointManagerFilePath, FileMode.Create); SpawnPointManagerData spawnPointManagerData = new SpawnPointManagerData(spawnPointManager); bf.Serialize(fStream, spawnPointManagerData); fStream.Close(); }
public static bool[] LoadSpawnPointsManager() { if (File.Exists(SpawnPointManagerFilePath)) { BinaryFormatter bf = new BinaryFormatter(); FileStream fStream = new FileStream(SpawnPointManagerFilePath, FileMode.Open); SpawnPointManagerData spawnPointManagerData = bf.Deserialize(fStream) as SpawnPointManagerData; fStream.Close(); return(spawnPointManagerData.spawnPointsActive); } else { return(null); } }