// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct EventContentDiceRaceEffectExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentDiceRaceEffectExcel GetRootAsEventContentDiceRaceEffectExcel(ByteBuffer _bb) { return GetRootAsEventContentDiceRaceEffectExcel(_bb, new EventContentDiceRaceEffectExcel()); } public static EventContentDiceRaceEffectExcel GetRootAsEventContentDiceRaceEffectExcel(ByteBuffer _bb, EventContentDiceRaceEffectExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentDiceRaceEffectExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.EventContentDiceRaceResultType EventContentDiceRaceResultType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.EventContentDiceRaceResultType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.EventContentDiceRaceResultType.DiceResult1; } } public bool IsDiceResult { get { int o = __p.__offset(8); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public string AniClip { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetAniClipBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetAniClipBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetAniClipArray() { return __p.__vector_as_array(10); } public uint VoiceId(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; } public int VoiceIdLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetVoiceIdBytes() { return __p.__vector_as_span(12, 4); } #else public ArraySegment? GetVoiceIdBytes() { return __p.__vector_as_arraysegment(12); } #endif public uint[] GetVoiceIdArray() { return __p.__vector_as_array(12); } public static Offset CreateEventContentDiceRaceEffectExcel(FlatBufferBuilder builder, long EventContentId = 0, SCHALE.Common.FlatData.EventContentDiceRaceResultType EventContentDiceRaceResultType = SCHALE.Common.FlatData.EventContentDiceRaceResultType.DiceResult1, bool IsDiceResult = false, StringOffset AniClipOffset = default(StringOffset), VectorOffset VoiceIdOffset = default(VectorOffset)) { builder.StartTable(5); EventContentDiceRaceEffectExcel.AddEventContentId(builder, EventContentId); EventContentDiceRaceEffectExcel.AddVoiceId(builder, VoiceIdOffset); EventContentDiceRaceEffectExcel.AddAniClip(builder, AniClipOffset); EventContentDiceRaceEffectExcel.AddEventContentDiceRaceResultType(builder, EventContentDiceRaceResultType); EventContentDiceRaceEffectExcel.AddIsDiceResult(builder, IsDiceResult); return EventContentDiceRaceEffectExcel.EndEventContentDiceRaceEffectExcel(builder); } public static void StartEventContentDiceRaceEffectExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddEventContentDiceRaceResultType(FlatBufferBuilder builder, SCHALE.Common.FlatData.EventContentDiceRaceResultType eventContentDiceRaceResultType) { builder.AddInt(1, (int)eventContentDiceRaceResultType, 0); } public static void AddIsDiceResult(FlatBufferBuilder builder, bool isDiceResult) { builder.AddBool(2, isDiceResult, false); } public static void AddAniClip(FlatBufferBuilder builder, StringOffset aniClipOffset) { builder.AddOffset(3, aniClipOffset.Value, 0); } public static void AddVoiceId(FlatBufferBuilder builder, VectorOffset voiceIdOffset) { builder.AddOffset(4, voiceIdOffset.Value, 0); } public static VectorOffset CreateVoiceIdVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); } public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartVoiceIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndEventContentDiceRaceEffectExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class EventContentDiceRaceEffectExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*EventContentDiceRaceResultType*/, 4 /*SCHALE.Common.FlatData.EventContentDiceRaceResultType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*IsDiceResult*/, 1 /*bool*/, 1, false) && verifier.VerifyString(tablePos, 10 /*AniClip*/, false) && verifier.VerifyVectorOfData(tablePos, 12 /*VoiceId*/, 4 /*uint*/, false) && verifier.VerifyTableEnd(tablePos); } } }