Esempio n. 1
0
        //セーブデータ用のバイナリ読み込み
        internal void Read(BinaryReader reader)
        {
            int version = reader.ReadInt32();

            if (version <= Version)
            {
                PlayMode       = (SoundPlayMode)reader.ReadInt32();
                IsLoop         = reader.ReadBoolean();
                PlayVolume     = reader.ReadSingle();
                ResourceVolume = reader.ReadSingle();
                IntroTime      = reader.ReadSingle();
                Tag            = reader.ReadString();
                string filePath = reader.ReadString();
                if (version <= Version0)
                {
                    File = AssetFileManager.GetFileCreateIfMissing(filePath);
                }
                else
                {
                    string key = reader.ReadString();
                    File = AssetFileManager.GetSoundFileCreateIfMissing(filePath, key);
                }
            }
            else
            {
                Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, version));
            }
        }