public static void SaveMainDoorKey(MainDoorKeyScript mainDoorKeyScript) { BinaryFormatter binaryFormatter = new BinaryFormatter(); FileStream fileStream = new FileStream(PathForFile(), FileMode.Create); MainDoorDataScript mainDoorDataScript = new MainDoorDataScript(mainDoorKeyScript); binaryFormatter.Serialize(fileStream, mainDoorDataScript); fileStream.Close(); }
public MainDoorDataScript(MainDoorKeyScript mainDoorKeyScript) { nameOfKey = mainDoorKeyScript.nameOfKeyToDestroy; }