コード例 #1
0
        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;
        }
コード例 #2
0
        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"));
        }