예제 #1
0
    /**** 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();
    }
예제 #2
0
    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);
        }
    }