/// <summary> /// Streamからフォント座標ヘッダーを読み込む。 /// </summary> /// <param name="reader">Stream</param> public void Read(BinaryReader reader) { this.GameObjectFileID = reader.ReadInt32(); this.GameObjectPathID = reader.ReadInt64(); this.GameObjectEnables = FsbBinUtils.ReadBoolean(reader); this.ScriptFileID = reader.ReadInt32(); this.ScriptPathID = reader.ReadInt64(); this.ScriptName = FsbBinUtils.ReadString(reader); this.MaterialFileID = reader.ReadInt32(); this.MaterialPathID = reader.ReadInt64(); this.UVRectX = reader.ReadSingle(); this.UVRectY = reader.ReadSingle(); this.UVRectWidth = reader.ReadSingle(); this.UVRectHeight = reader.ReadSingle(); this.BMFontSize = reader.ReadInt32(); this.BMFontBase = reader.ReadInt32(); this.BMFontWidth = reader.ReadInt32(); this.BMFontHeight = reader.ReadInt32(); this.SpriteName = FsbBinUtils.ReadString(reader); }
/// <summary> /// 言語データエントリーをStreamに書き出す。 /// </summary> /// <param name="bw">Stream</param> public void Write(BinaryWriter bw) { FsbBinUtils.WriteString(bw, this.TranslationId); FsbBinUtils.WriteString(bw, this.TranslationText); bw.Write(this.LastModificationTicks); FsbBinUtils.WriteString(bw, this.HumanlyReadableDate); }
/// <summary> /// Streamへフォント座標ヘッダーを書き込む。 /// </summary> /// <param name="writer">Stream</param> public void Write(BinaryWriter writer) { //// ToDo: ファイル名や内部名の長さを求める処理を追加。 writer.Write(this.GameObjectFileID); writer.Write(this.GameObjectPathID); FsbBinUtils.WriteBoolean(writer, this.GameObjectEnables); writer.Write(this.ScriptFileID); writer.Write(this.ScriptPathID); FsbBinUtils.WriteString(writer, this.ScriptName); writer.Write(this.MaterialFileID); writer.Write(this.MaterialPathID); writer.Write(this.UVRectX); writer.Write(this.UVRectY); writer.Write(this.UVRectWidth); writer.Write(this.UVRectHeight); writer.Write(this.BMFontSize); writer.Write(this.BMFontBase); writer.Write(this.BMFontWidth); writer.Write(this.BMFontHeight); FsbBinUtils.WriteString(writer, this.SpriteName); }
/// <summary> /// Streamにデータを書き込む。 /// </summary> /// <param name="bw">Stream</param> public void Write(BinaryWriter bw) { FsbBinUtils.WriteString(bw, this.EntryID); bw.Write(this.TermType); FsbBinUtils.WriteString(bw, this.Description); //// Texts bw.Write(this.Texts.Count); foreach (var text in this.Texts) { FsbBinUtils.WriteString(bw, text); } //// LanguagesTouch bw.Write(this.LanguagesTouch.Count); foreach (var entry in this.LanguagesTouch) { FsbBinUtils.WriteString(bw, entry); } //// Flags bw.Write(this.Flags.Count); foreach (var entry in this.Flags) { bw.Write(entry); } }
/// <summary> /// Streamから言語データエントリーを読み込む。 /// </summary> /// <param name="br">Stream</param> public void Read(BinaryReader br) { this.TranslationId = FsbBinUtils.ReadString(br); this.TranslationText = FsbBinUtils.ReadString(br); this.LastModificationTicks = br.ReadInt64(); this.HumanlyReadableDate = FsbBinUtils.ReadString(br); }
/// <summary> /// Streamにデータを書き込む。 /// </summary> /// <param name="bw">Stream</param> public void Write(BinaryWriter bw) { this.LanguageCategoryFile.Write(bw); FsbBinUtils.WriteBoolean(bw, this.CaseInsensitiveTerms); bw.Write(this.AssetsCount); FsbBinUtils.WriteBoolean(bw, this.NeverDestroy); FsbBinUtils.WriteBoolean(bw, this.UserAgreesToHaveItOnTheScene); }
/// <summary> /// ヘッダー情報をStreamに書き出す。 /// </summary> /// <param name="bw">stream</param> public void Write(BinaryWriter bw) { bw.Write(this.GameObjectFileID); bw.Write(this.GameObjectPathID); FsbBinUtils.WriteBoolean(bw, this.Enabled); bw.Write(this.ScriptFileID); bw.Write(this.ScriptPathID); FsbBinUtils.WriteString(bw, this.Name); FsbBinUtils.WriteString(bw, this.LanguageKey); FsbBinUtils.WriteString(bw, this.MasterLanguageKey); }
/// <summary> /// Streamからヘッダー情報を読み込む。 /// </summary> /// <param name="br">stream</param> public void Read(BinaryReader br) { this.GameObjectFileID = br.ReadInt32(); this.GameObjectPathID = br.ReadInt64(); this.Enabled = FsbBinUtils.ReadBoolean(br); this.ScriptFileID = br.ReadInt32(); this.ScriptPathID = br.ReadInt64(); this.Name = FsbBinUtils.ReadString(br); this.LanguageKey = FsbBinUtils.ReadString(br); this.MasterLanguageKey = FsbBinUtils.ReadString(br); }
/// <summary> /// Streamにデータを書き込む。 /// </summary> /// <param name="bw">Stream</param> public void Write(BinaryWriter bw) { bw.Write(this.GameObjectFileID); bw.Write(this.GameObjectPathID); FsbBinUtils.WriteBoolean(bw, this.Enabled); bw.Write(this.ScriptFileID); bw.Write(this.ScriptPathID); FsbBinUtils.WriteString(bw, this.Name); FsbBinUtils.WriteString(bw, this.GoogleWebServiceURL); FsbBinUtils.WriteString(bw, this.GoogleSpreadsheetKey); FsbBinUtils.WriteString(bw, this.GoogleSpreadsheetName); FsbBinUtils.WriteString(bw, this.GoogleLastUpdatedVersion); bw.Write(this.GoogleUpdateFrequency); }
/// <summary> /// Streamからデータを読み込み、言語ヘッダーを返す。 /// </summary> /// <param name="br">Stream</param> /// <returns>言語ヘッダー</returns> public static FssLanguageHeader Read(BinaryReader br) { var fssLanguageHeader = new FssLanguageHeader(); fssLanguageHeader.GameObjectFileID = br.ReadInt32(); fssLanguageHeader.GameObjectPathID = br.ReadInt64(); fssLanguageHeader.Enabled = FsbBinUtils.ReadBoolean(br); fssLanguageHeader.ScriptFileID = br.ReadInt32(); fssLanguageHeader.ScriptPathID = br.ReadInt64(); fssLanguageHeader.Name = FsbBinUtils.ReadString(br); fssLanguageHeader.GoogleWebServiceURL = FsbBinUtils.ReadString(br); fssLanguageHeader.GoogleSpreadsheetKey = FsbBinUtils.ReadString(br); fssLanguageHeader.GoogleSpreadsheetName = FsbBinUtils.ReadString(br); fssLanguageHeader.GoogleLastUpdatedVersion = FsbBinUtils.ReadString(br); fssLanguageHeader.GoogleUpdateFrequency = br.ReadInt32(); return(fssLanguageHeader); }
/// <summary> /// Streamからデータを読み込み、言語エントリーを返す。 /// </summary> /// <param name="reader">Stream</param> /// <returns>言語エントリー</returns> public static FssLanguageEntry Read(BinaryReader reader) { var fssLanguageEntry = new FssLanguageEntry(); fssLanguageEntry.EntryID = FsbBinUtils.ReadString(reader); fssLanguageEntry.TermType = reader.ReadInt32(); fssLanguageEntry.Description = FsbBinUtils.ReadString(reader); if (fssLanguageEntry.Description == "\"") { ////fssLanguageEntry.Description = string.Empty; } var langCount = reader.ReadInt32(); fssLanguageEntry.Texts = new List <string>(); for (var i = 0; i < langCount; i++) { var text = FsbBinUtils.ReadString(reader); fssLanguageEntry.Texts.Add(text); } int languagesTouchCount = reader.ReadInt32(); fssLanguageEntry.LanguagesTouch = new List <string>(); for (int i = 0; i < languagesTouchCount; i++) { var touch = FsbBinUtils.ReadString(reader); fssLanguageEntry.LanguagesTouch.Add(touch); } int flagsCount = reader.ReadInt32(); fssLanguageEntry.Flags = new List <int>(); for (int i = 0; i < flagsCount; i++) { var flags = reader.ReadInt32(); fssLanguageEntry.Flags.Add(flags); } return(fssLanguageEntry); }
/// <summary> /// Streamからデータを読み込み、言語フッターを返す。 /// </summary> /// <param name="reader">Stream</param> /// <returns>言語フッター</returns> public static FssLanguageFooter Read(BinaryReader reader) { var fssLanguageFooter = new FssLanguageFooter(); try { fssLanguageFooter.LanguageCategoryFile.Read(reader); fssLanguageFooter.CaseInsensitiveTerms = FsbBinUtils.ReadBoolean(reader); fssLanguageFooter.AssetsCount = reader.ReadInt32(); //// ToDo: Assets配列の処理を追加する。 fssLanguageFooter.NeverDestroy = FsbBinUtils.ReadBoolean(reader); fssLanguageFooter.UserAgreesToHaveItOnTheScene = FsbBinUtils.ReadBoolean(reader); } catch { throw; } return(fssLanguageFooter); }
/// <summary> /// Streamに言語テーブルエントリーを書き込む。 /// </summary> /// <param name="bw">Stream</param> public void Write(BinaryWriter bw) { FsbBinUtils.WriteString(bw, this.Name); FsbBinUtils.WriteString(bw, this.Code); }
/// <summary> /// Streamから言語テーブルエントリーを読み込む。 /// </summary> /// <param name="br">Stream</param> public void Read(BinaryReader br) { this.Name = FsbBinUtils.ReadString(br); this.Code = FsbBinUtils.ReadString(br); }