// // 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 BossExternalBTExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static BossExternalBTExcel GetRootAsBossExternalBTExcel(ByteBuffer _bb) { return GetRootAsBossExternalBTExcel(_bb, new BossExternalBTExcel()); } public static BossExternalBTExcel GetRootAsBossExternalBTExcel(ByteBuffer _bb, BossExternalBTExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public BossExternalBTExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long ExternalBTId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long AIPhase { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ExternalBTNodeType ExternalBTNodeType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ExternalBTNodeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBTNodeType.Sequence; } } public SCHALE.Common.FlatData.ExternalBTTrigger ExternalBTTrigger { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ExternalBTTrigger)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBTTrigger.None; } } public string TriggerArgument { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetTriggerArgumentBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetTriggerArgumentBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetTriggerArgumentArray() { return __p.__vector_as_array(12); } public long BehaviorRate { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.ExternalBehavior)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill; } } public string BehaviorArgument { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBehaviorArgumentBytes() { return __p.__vector_as_span(18, 1); } #else public ArraySegment? GetBehaviorArgumentBytes() { return __p.__vector_as_arraysegment(18); } #endif public byte[] GetBehaviorArgumentArray() { return __p.__vector_as_array(18); } public static Offset CreateBossExternalBTExcel(FlatBufferBuilder builder, long ExternalBTId = 0, long AIPhase = 0, SCHALE.Common.FlatData.ExternalBTNodeType ExternalBTNodeType = SCHALE.Common.FlatData.ExternalBTNodeType.Sequence, SCHALE.Common.FlatData.ExternalBTTrigger ExternalBTTrigger = SCHALE.Common.FlatData.ExternalBTTrigger.None, StringOffset TriggerArgumentOffset = default(StringOffset), long BehaviorRate = 0, SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior = SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill, StringOffset BehaviorArgumentOffset = default(StringOffset)) { builder.StartTable(8); BossExternalBTExcel.AddBehaviorRate(builder, BehaviorRate); BossExternalBTExcel.AddAIPhase(builder, AIPhase); BossExternalBTExcel.AddExternalBTId(builder, ExternalBTId); BossExternalBTExcel.AddBehaviorArgument(builder, BehaviorArgumentOffset); BossExternalBTExcel.AddExternalBehavior(builder, ExternalBehavior); BossExternalBTExcel.AddTriggerArgument(builder, TriggerArgumentOffset); BossExternalBTExcel.AddExternalBTTrigger(builder, ExternalBTTrigger); BossExternalBTExcel.AddExternalBTNodeType(builder, ExternalBTNodeType); return BossExternalBTExcel.EndBossExternalBTExcel(builder); } public static void StartBossExternalBTExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddExternalBTId(FlatBufferBuilder builder, long externalBTId) { builder.AddLong(0, externalBTId, 0); } public static void AddAIPhase(FlatBufferBuilder builder, long aIPhase) { builder.AddLong(1, aIPhase, 0); } public static void AddExternalBTNodeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBTNodeType externalBTNodeType) { builder.AddInt(2, (int)externalBTNodeType, 0); } public static void AddExternalBTTrigger(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBTTrigger externalBTTrigger) { builder.AddInt(3, (int)externalBTTrigger, 0); } public static void AddTriggerArgument(FlatBufferBuilder builder, StringOffset triggerArgumentOffset) { builder.AddOffset(4, triggerArgumentOffset.Value, 0); } public static void AddBehaviorRate(FlatBufferBuilder builder, long behaviorRate) { builder.AddLong(5, behaviorRate, 0); } public static void AddExternalBehavior(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBehavior externalBehavior) { builder.AddInt(6, (int)externalBehavior, 0); } public static void AddBehaviorArgument(FlatBufferBuilder builder, StringOffset behaviorArgumentOffset) { builder.AddOffset(7, behaviorArgumentOffset.Value, 0); } public static Offset EndBossExternalBTExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class BossExternalBTExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*ExternalBTId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*AIPhase*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*ExternalBTNodeType*/, 4 /*SCHALE.Common.FlatData.ExternalBTNodeType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*ExternalBTTrigger*/, 4 /*SCHALE.Common.FlatData.ExternalBTTrigger*/, 4, false) && verifier.VerifyString(tablePos, 12 /*TriggerArgument*/, false) && verifier.VerifyField(tablePos, 14 /*BehaviorRate*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*ExternalBehavior*/, 4 /*SCHALE.Common.FlatData.ExternalBehavior*/, 4, false) && verifier.VerifyString(tablePos, 18 /*BehaviorArgument*/, false) && verifier.VerifyTableEnd(tablePos); } } }