// // 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 ScenarioBGEffectExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ScenarioBGEffectExcel GetRootAsScenarioBGEffectExcel(ByteBuffer _bb) { return GetRootAsScenarioBGEffectExcel(_bb, new ScenarioBGEffectExcel()); } public static ScenarioBGEffectExcel GetRootAsScenarioBGEffectExcel(ByteBuffer _bb, ScenarioBGEffectExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ScenarioBGEffectExcel __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 string Effect { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetEffectBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetEffectBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetEffectArray() { return __p.__vector_as_array(6); } public SCHALE.Common.FlatData.ScenarioBGScroll Scroll { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ScenarioBGScroll)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioBGScroll.None; } } public long ScrollTime { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ScrollFrom { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ScrollTo { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateScenarioBGEffectExcel(FlatBufferBuilder builder, uint Name = 0, StringOffset EffectOffset = default(StringOffset), SCHALE.Common.FlatData.ScenarioBGScroll Scroll = SCHALE.Common.FlatData.ScenarioBGScroll.None, long ScrollTime = 0, long ScrollFrom = 0, long ScrollTo = 0) { builder.StartTable(6); ScenarioBGEffectExcel.AddScrollTo(builder, ScrollTo); ScenarioBGEffectExcel.AddScrollFrom(builder, ScrollFrom); ScenarioBGEffectExcel.AddScrollTime(builder, ScrollTime); ScenarioBGEffectExcel.AddScroll(builder, Scroll); ScenarioBGEffectExcel.AddEffect(builder, EffectOffset); ScenarioBGEffectExcel.AddName(builder, Name); return ScenarioBGEffectExcel.EndScenarioBGEffectExcel(builder); } public static void StartScenarioBGEffectExcel(FlatBufferBuilder builder) { builder.StartTable(6); } public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); } public static void AddEffect(FlatBufferBuilder builder, StringOffset effectOffset) { builder.AddOffset(1, effectOffset.Value, 0); } public static void AddScroll(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioBGScroll scroll) { builder.AddInt(2, (int)scroll, 0); } public static void AddScrollTime(FlatBufferBuilder builder, long scrollTime) { builder.AddLong(3, scrollTime, 0); } public static void AddScrollFrom(FlatBufferBuilder builder, long scrollFrom) { builder.AddLong(4, scrollFrom, 0); } public static void AddScrollTo(FlatBufferBuilder builder, long scrollTo) { builder.AddLong(5, scrollTo, 0); } public static Offset EndScenarioBGEffectExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ScenarioBGEffectExcelT UnPack() { var _o = new ScenarioBGEffectExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ScenarioBGEffectExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ScenarioBGEffect"); _o.Name = TableEncryptionService.Convert(this.Name, key); _o.Effect = TableEncryptionService.Convert(this.Effect, key); _o.Scroll = TableEncryptionService.Convert(this.Scroll, key); _o.ScrollTime = TableEncryptionService.Convert(this.ScrollTime, key); _o.ScrollFrom = TableEncryptionService.Convert(this.ScrollFrom, key); _o.ScrollTo = TableEncryptionService.Convert(this.ScrollTo, key); } public static Offset Pack(FlatBufferBuilder builder, ScenarioBGEffectExcelT _o) { if (_o == null) return default(Offset); var _Effect = _o.Effect == null ? default(StringOffset) : builder.CreateString(_o.Effect); return CreateScenarioBGEffectExcel( builder, _o.Name, _Effect, _o.Scroll, _o.ScrollTime, _o.ScrollFrom, _o.ScrollTo); } } public class ScenarioBGEffectExcelT { public uint Name { get; set; } public string Effect { get; set; } public SCHALE.Common.FlatData.ScenarioBGScroll Scroll { get; set; } public long ScrollTime { get; set; } public long ScrollFrom { get; set; } public long ScrollTo { get; set; } public ScenarioBGEffectExcelT() { this.Name = 0; this.Effect = null; this.Scroll = SCHALE.Common.FlatData.ScenarioBGScroll.None; this.ScrollTime = 0; this.ScrollFrom = 0; this.ScrollTo = 0; } } static public class ScenarioBGEffectExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 6 /*Effect*/, false) && verifier.VerifyField(tablePos, 8 /*Scroll*/, 4 /*SCHALE.Common.FlatData.ScenarioBGScroll*/, 4, false) && verifier.VerifyField(tablePos, 10 /*ScrollTime*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*ScrollFrom*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*ScrollTo*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }