예제 #1
0
        public void CreateSaveFile(string filename, CharacterData.CharacterInfo charInfo)
        {
            CurrentSaveName = filename;
            CurrentSaveData = new SaveData {
                characterVisuals = new CharacterVisual(charInfo)
            };

            if (!File.Exists(filePath))
            {
                File.Create(filePath).Close();
            }

            DataFormat format = DataFormat.Binary;
            var        bytes  = SerializationUtility.SerializeValue(CurrentSaveData, format);

            File.WriteAllBytes(filePath, bytes);
        }
예제 #2
0
 public static void Create(string filename, CharacterData.CharacterInfo charInfo)
 {
     PlayerPrefs.SetInt(TutorialKey, 1);
     manager.CreateSaveFile(filename, charInfo);
 }
예제 #3
0
 public static void Create(string filename, CharacterData.CharacterInfo charInfo)
 {
     manager.CreateSaveFile(filename, charInfo);
 }