// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct ScenarioBGNameExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ScenarioBGNameExcel GetRootAsScenarioBGNameExcel(ByteBuffer _bb) { return GetRootAsScenarioBGNameExcel(_bb, new ScenarioBGNameExcel()); } public static ScenarioBGNameExcel GetRootAsScenarioBGNameExcel(ByteBuffer _bb, ScenarioBGNameExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ScenarioBGNameExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.ProductionStep ProductionStep { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.ProductionStep)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductionStep.ToDo; } } public string BGFileName { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBGFileNameBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetBGFileNameBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetBGFileNameArray() { return __p.__vector_as_array(8); } public SCHALE.Common.FlatData.ScenarioBGType BGType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ScenarioBGType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioBGType.None; } } public string AnimationRoot { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetAnimationRootBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetAnimationRootBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetAnimationRootArray() { return __p.__vector_as_array(12); } public string AnimationName { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetAnimationNameBytes() { return __p.__vector_as_span(14, 1); } #else public ArraySegment? GetAnimationNameBytes() { return __p.__vector_as_arraysegment(14); } #endif public byte[] GetAnimationNameArray() { return __p.__vector_as_array(14); } public float SpineScale { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } } public int SpineLocalPosX { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int SpineLocalPosY { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public static Offset CreateScenarioBGNameExcel(FlatBufferBuilder builder, uint Name = 0, SCHALE.Common.FlatData.ProductionStep ProductionStep = SCHALE.Common.FlatData.ProductionStep.ToDo, StringOffset BGFileNameOffset = default(StringOffset), SCHALE.Common.FlatData.ScenarioBGType BGType = SCHALE.Common.FlatData.ScenarioBGType.None, StringOffset AnimationRootOffset = default(StringOffset), StringOffset AnimationNameOffset = default(StringOffset), float SpineScale = 0.0f, int SpineLocalPosX = 0, int SpineLocalPosY = 0) { builder.StartTable(9); ScenarioBGNameExcel.AddSpineLocalPosY(builder, SpineLocalPosY); ScenarioBGNameExcel.AddSpineLocalPosX(builder, SpineLocalPosX); ScenarioBGNameExcel.AddSpineScale(builder, SpineScale); ScenarioBGNameExcel.AddAnimationName(builder, AnimationNameOffset); ScenarioBGNameExcel.AddAnimationRoot(builder, AnimationRootOffset); ScenarioBGNameExcel.AddBGType(builder, BGType); ScenarioBGNameExcel.AddBGFileName(builder, BGFileNameOffset); ScenarioBGNameExcel.AddProductionStep(builder, ProductionStep); ScenarioBGNameExcel.AddName(builder, Name); return ScenarioBGNameExcel.EndScenarioBGNameExcel(builder); } public static void StartScenarioBGNameExcel(FlatBufferBuilder builder) { builder.StartTable(9); } public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); } public static void AddProductionStep(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductionStep productionStep) { builder.AddInt(1, (int)productionStep, 0); } public static void AddBGFileName(FlatBufferBuilder builder, StringOffset bGFileNameOffset) { builder.AddOffset(2, bGFileNameOffset.Value, 0); } public static void AddBGType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioBGType bGType) { builder.AddInt(3, (int)bGType, 0); } public static void AddAnimationRoot(FlatBufferBuilder builder, StringOffset animationRootOffset) { builder.AddOffset(4, animationRootOffset.Value, 0); } public static void AddAnimationName(FlatBufferBuilder builder, StringOffset animationNameOffset) { builder.AddOffset(5, animationNameOffset.Value, 0); } public static void AddSpineScale(FlatBufferBuilder builder, float spineScale) { builder.AddFloat(6, spineScale, 0.0f); } public static void AddSpineLocalPosX(FlatBufferBuilder builder, int spineLocalPosX) { builder.AddInt(7, spineLocalPosX, 0); } public static void AddSpineLocalPosY(FlatBufferBuilder builder, int spineLocalPosY) { builder.AddInt(8, spineLocalPosY, 0); } public static Offset EndScenarioBGNameExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ScenarioBGNameExcelT UnPack() { var _o = new ScenarioBGNameExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ScenarioBGNameExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ScenarioBGName"); _o.Name = TableEncryptionService.Convert(this.Name, key); _o.ProductionStep = TableEncryptionService.Convert(this.ProductionStep, key); _o.BGFileName = TableEncryptionService.Convert(this.BGFileName, key); _o.BGType = TableEncryptionService.Convert(this.BGType, key); _o.AnimationRoot = TableEncryptionService.Convert(this.AnimationRoot, key); _o.AnimationName = TableEncryptionService.Convert(this.AnimationName, key); _o.SpineScale = TableEncryptionService.Convert(this.SpineScale, key); _o.SpineLocalPosX = TableEncryptionService.Convert(this.SpineLocalPosX, key); _o.SpineLocalPosY = TableEncryptionService.Convert(this.SpineLocalPosY, key); } public static Offset Pack(FlatBufferBuilder builder, ScenarioBGNameExcelT _o) { if (_o == null) return default(Offset); var _BGFileName = _o.BGFileName == null ? default(StringOffset) : builder.CreateString(_o.BGFileName); var _AnimationRoot = _o.AnimationRoot == null ? default(StringOffset) : builder.CreateString(_o.AnimationRoot); var _AnimationName = _o.AnimationName == null ? default(StringOffset) : builder.CreateString(_o.AnimationName); return CreateScenarioBGNameExcel( builder, _o.Name, _o.ProductionStep, _BGFileName, _o.BGType, _AnimationRoot, _AnimationName, _o.SpineScale, _o.SpineLocalPosX, _o.SpineLocalPosY); } } public class ScenarioBGNameExcelT { public uint Name { get; set; } public SCHALE.Common.FlatData.ProductionStep ProductionStep { get; set; } public string BGFileName { get; set; } public SCHALE.Common.FlatData.ScenarioBGType BGType { get; set; } public string AnimationRoot { get; set; } public string AnimationName { get; set; } public float SpineScale { get; set; } public int SpineLocalPosX { get; set; } public int SpineLocalPosY { get; set; } public ScenarioBGNameExcelT() { this.Name = 0; this.ProductionStep = SCHALE.Common.FlatData.ProductionStep.ToDo; this.BGFileName = null; this.BGType = SCHALE.Common.FlatData.ScenarioBGType.None; this.AnimationRoot = null; this.AnimationName = null; this.SpineScale = 0.0f; this.SpineLocalPosX = 0; this.SpineLocalPosY = 0; } } static public class ScenarioBGNameExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 6 /*ProductionStep*/, 4 /*SCHALE.Common.FlatData.ProductionStep*/, 4, false) && verifier.VerifyString(tablePos, 8 /*BGFileName*/, false) && verifier.VerifyField(tablePos, 10 /*BGType*/, 4 /*SCHALE.Common.FlatData.ScenarioBGType*/, 4, false) && verifier.VerifyString(tablePos, 12 /*AnimationRoot*/, false) && verifier.VerifyString(tablePos, 14 /*AnimationName*/, false) && verifier.VerifyField(tablePos, 16 /*SpineScale*/, 4 /*float*/, 4, false) && verifier.VerifyField(tablePos, 18 /*SpineLocalPosX*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 20 /*SpineLocalPosY*/, 4 /*int*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }