public void Load(BadBonus bed, int number) { var file = Path.Combine(_path, _fileName + number + ".bat"); if (!File.Exists(file)) { return; } var newBed = _data.Load(file); bed.transform.position = newBed.Position; }
public void Save(BadBonus bed, int number) { if (!Directory.Exists(Path.Combine(_path))) { Directory.CreateDirectory(_path); } var saveBed = new SavedData { Position = bed.transform.position, }; _data.Save(saveBed, Path.Combine(_path, _fileName + number + ".bat")); }