// // 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 MiniGameShootingStageExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MiniGameShootingStageExcel GetRootAsMiniGameShootingStageExcel(ByteBuffer _bb) { return GetRootAsMiniGameShootingStageExcel(_bb, new MiniGameShootingStageExcel()); } public static MiniGameShootingStageExcel GetRootAsMiniGameShootingStageExcel(ByteBuffer _bb, MiniGameShootingStageExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MiniGameShootingStageExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long BgmId(int j) { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int BgmIdLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetBgmIdBytes() { return __p.__vector_as_span(6, 8); } #else public ArraySegment? GetBgmIdBytes() { return __p.__vector_as_arraysegment(6); } #endif public long[] GetBgmIdArray() { return __p.__vector_as_array(6); } public long CostGoodsId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.Difficulty Difficulty_ { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.Difficulty)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Difficulty.Normal; } } public string DesignLevel { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetDesignLevelBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetDesignLevelBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetDesignLevelArray() { return __p.__vector_as_array(12); } public string ArtLevel { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetArtLevelBytes() { return __p.__vector_as_span(14, 1); } #else public ArraySegment? GetArtLevelBytes() { return __p.__vector_as_arraysegment(14); } #endif public byte[] GetArtLevelArray() { return __p.__vector_as_array(14); } public long StartBattleDuration { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long DefaultBattleDuration { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string DefaultLogicEffect { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetDefaultLogicEffectBytes() { return __p.__vector_as_span(20, 1); } #else public ArraySegment? GetDefaultLogicEffectBytes() { return __p.__vector_as_arraysegment(20); } #endif public byte[] GetDefaultLogicEffectArray() { return __p.__vector_as_array(20); } public float CameraSizeRate { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } } public long EventContentStageRewardId { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateMiniGameShootingStageExcel(FlatBufferBuilder builder, long UniqueId = 0, VectorOffset BgmIdOffset = default(VectorOffset), long CostGoodsId = 0, SCHALE.Common.FlatData.Difficulty Difficulty_ = SCHALE.Common.FlatData.Difficulty.Normal, StringOffset DesignLevelOffset = default(StringOffset), StringOffset ArtLevelOffset = default(StringOffset), long StartBattleDuration = 0, long DefaultBattleDuration = 0, StringOffset DefaultLogicEffectOffset = default(StringOffset), float CameraSizeRate = 0.0f, long EventContentStageRewardId = 0) { builder.StartTable(11); MiniGameShootingStageExcel.AddEventContentStageRewardId(builder, EventContentStageRewardId); MiniGameShootingStageExcel.AddDefaultBattleDuration(builder, DefaultBattleDuration); MiniGameShootingStageExcel.AddStartBattleDuration(builder, StartBattleDuration); MiniGameShootingStageExcel.AddCostGoodsId(builder, CostGoodsId); MiniGameShootingStageExcel.AddUniqueId(builder, UniqueId); MiniGameShootingStageExcel.AddCameraSizeRate(builder, CameraSizeRate); MiniGameShootingStageExcel.AddDefaultLogicEffect(builder, DefaultLogicEffectOffset); MiniGameShootingStageExcel.AddArtLevel(builder, ArtLevelOffset); MiniGameShootingStageExcel.AddDesignLevel(builder, DesignLevelOffset); MiniGameShootingStageExcel.AddDifficulty_(builder, Difficulty_); MiniGameShootingStageExcel.AddBgmId(builder, BgmIdOffset); return MiniGameShootingStageExcel.EndMiniGameShootingStageExcel(builder); } public static void StartMiniGameShootingStageExcel(FlatBufferBuilder builder) { builder.StartTable(11); } public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); } public static void AddBgmId(FlatBufferBuilder builder, VectorOffset bgmIdOffset) { builder.AddOffset(1, bgmIdOffset.Value, 0); } public static VectorOffset CreateBgmIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateBgmIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateBgmIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateBgmIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartBgmIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddCostGoodsId(FlatBufferBuilder builder, long costGoodsId) { builder.AddLong(2, costGoodsId, 0); } public static void AddDifficulty_(FlatBufferBuilder builder, SCHALE.Common.FlatData.Difficulty difficulty_) { builder.AddInt(3, (int)difficulty_, 0); } public static void AddDesignLevel(FlatBufferBuilder builder, StringOffset designLevelOffset) { builder.AddOffset(4, designLevelOffset.Value, 0); } public static void AddArtLevel(FlatBufferBuilder builder, StringOffset artLevelOffset) { builder.AddOffset(5, artLevelOffset.Value, 0); } public static void AddStartBattleDuration(FlatBufferBuilder builder, long startBattleDuration) { builder.AddLong(6, startBattleDuration, 0); } public static void AddDefaultBattleDuration(FlatBufferBuilder builder, long defaultBattleDuration) { builder.AddLong(7, defaultBattleDuration, 0); } public static void AddDefaultLogicEffect(FlatBufferBuilder builder, StringOffset defaultLogicEffectOffset) { builder.AddOffset(8, defaultLogicEffectOffset.Value, 0); } public static void AddCameraSizeRate(FlatBufferBuilder builder, float cameraSizeRate) { builder.AddFloat(9, cameraSizeRate, 0.0f); } public static void AddEventContentStageRewardId(FlatBufferBuilder builder, long eventContentStageRewardId) { builder.AddLong(10, eventContentStageRewardId, 0); } public static Offset EndMiniGameShootingStageExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MiniGameShootingStageExcelT UnPack() { var _o = new MiniGameShootingStageExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MiniGameShootingStageExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MiniGameShootingStage"); _o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key); _o.BgmId = new List(); for (var _j = 0; _j < this.BgmIdLength; ++_j) {_o.BgmId.Add(TableEncryptionService.Convert(this.BgmId(_j), key));} _o.CostGoodsId = TableEncryptionService.Convert(this.CostGoodsId, key); _o.Difficulty_ = TableEncryptionService.Convert(this.Difficulty_, key); _o.DesignLevel = TableEncryptionService.Convert(this.DesignLevel, key); _o.ArtLevel = TableEncryptionService.Convert(this.ArtLevel, key); _o.StartBattleDuration = TableEncryptionService.Convert(this.StartBattleDuration, key); _o.DefaultBattleDuration = TableEncryptionService.Convert(this.DefaultBattleDuration, key); _o.DefaultLogicEffect = TableEncryptionService.Convert(this.DefaultLogicEffect, key); _o.CameraSizeRate = TableEncryptionService.Convert(this.CameraSizeRate, key); _o.EventContentStageRewardId = TableEncryptionService.Convert(this.EventContentStageRewardId, key); } public static Offset Pack(FlatBufferBuilder builder, MiniGameShootingStageExcelT _o) { if (_o == null) return default(Offset); var _BgmId = default(VectorOffset); if (_o.BgmId != null) { var __BgmId = _o.BgmId.ToArray(); _BgmId = CreateBgmIdVector(builder, __BgmId); } var _DesignLevel = _o.DesignLevel == null ? default(StringOffset) : builder.CreateString(_o.DesignLevel); var _ArtLevel = _o.ArtLevel == null ? default(StringOffset) : builder.CreateString(_o.ArtLevel); var _DefaultLogicEffect = _o.DefaultLogicEffect == null ? default(StringOffset) : builder.CreateString(_o.DefaultLogicEffect); return CreateMiniGameShootingStageExcel( builder, _o.UniqueId, _BgmId, _o.CostGoodsId, _o.Difficulty_, _DesignLevel, _ArtLevel, _o.StartBattleDuration, _o.DefaultBattleDuration, _DefaultLogicEffect, _o.CameraSizeRate, _o.EventContentStageRewardId); } } public class MiniGameShootingStageExcelT { public long UniqueId { get; set; } public List BgmId { get; set; } public long CostGoodsId { get; set; } public SCHALE.Common.FlatData.Difficulty Difficulty_ { get; set; } public string DesignLevel { get; set; } public string ArtLevel { get; set; } public long StartBattleDuration { get; set; } public long DefaultBattleDuration { get; set; } public string DefaultLogicEffect { get; set; } public float CameraSizeRate { get; set; } public long EventContentStageRewardId { get; set; } public MiniGameShootingStageExcelT() { this.UniqueId = 0; this.BgmId = null; this.CostGoodsId = 0; this.Difficulty_ = SCHALE.Common.FlatData.Difficulty.Normal; this.DesignLevel = null; this.ArtLevel = null; this.StartBattleDuration = 0; this.DefaultBattleDuration = 0; this.DefaultLogicEffect = null; this.CameraSizeRate = 0.0f; this.EventContentStageRewardId = 0; } } static public class MiniGameShootingStageExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 6 /*BgmId*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 8 /*CostGoodsId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*Difficulty_*/, 4 /*SCHALE.Common.FlatData.Difficulty*/, 4, false) && verifier.VerifyString(tablePos, 12 /*DesignLevel*/, false) && verifier.VerifyString(tablePos, 14 /*ArtLevel*/, false) && verifier.VerifyField(tablePos, 16 /*StartBattleDuration*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 18 /*DefaultBattleDuration*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 20 /*DefaultLogicEffect*/, false) && verifier.VerifyField(tablePos, 22 /*CameraSizeRate*/, 4 /*float*/, 4, false) && verifier.VerifyField(tablePos, 24 /*EventContentStageRewardId*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }