// // 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 MiniGameAudioAnimatorExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MiniGameAudioAnimatorExcel GetRootAsMiniGameAudioAnimatorExcel(ByteBuffer _bb) { return GetRootAsMiniGameAudioAnimatorExcel(_bb, new MiniGameAudioAnimatorExcel()); } public static MiniGameAudioAnimatorExcel GetRootAsMiniGameAudioAnimatorExcel(ByteBuffer _bb, MiniGameAudioAnimatorExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MiniGameAudioAnimatorExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public uint ControllerNameHash { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string VoiceNamePrefix { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetVoiceNamePrefixBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetVoiceNamePrefixBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetVoiceNamePrefixArray() { return __p.__vector_as_array(6); } public uint StateNameHash { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string StateName { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetStateNameBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetStateNameBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetStateNameArray() { return __p.__vector_as_array(10); } public bool IgnoreInterruptDelay { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool IgnoreInterruptPlay { get { int o = __p.__offset(14); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public float Volume { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } } public float Delay { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } } public int AudioPriority { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public string AudioClipPath(int j) { int o = __p.__offset(22); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int AudioClipPathLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } public uint VoiceHash(int j) { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; } public int VoiceHashLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetVoiceHashBytes() { return __p.__vector_as_span(24, 4); } #else public ArraySegment? GetVoiceHashBytes() { return __p.__vector_as_arraysegment(24); } #endif public uint[] GetVoiceHashArray() { return __p.__vector_as_array(24); } public static Offset CreateMiniGameAudioAnimatorExcel(FlatBufferBuilder builder, uint ControllerNameHash = 0, StringOffset VoiceNamePrefixOffset = default(StringOffset), uint StateNameHash = 0, StringOffset StateNameOffset = default(StringOffset), bool IgnoreInterruptDelay = false, bool IgnoreInterruptPlay = false, float Volume = 0.0f, float Delay = 0.0f, int AudioPriority = 0, VectorOffset AudioClipPathOffset = default(VectorOffset), VectorOffset VoiceHashOffset = default(VectorOffset)) { builder.StartTable(11); MiniGameAudioAnimatorExcel.AddVoiceHash(builder, VoiceHashOffset); MiniGameAudioAnimatorExcel.AddAudioClipPath(builder, AudioClipPathOffset); MiniGameAudioAnimatorExcel.AddAudioPriority(builder, AudioPriority); MiniGameAudioAnimatorExcel.AddDelay(builder, Delay); MiniGameAudioAnimatorExcel.AddVolume(builder, Volume); MiniGameAudioAnimatorExcel.AddStateName(builder, StateNameOffset); MiniGameAudioAnimatorExcel.AddStateNameHash(builder, StateNameHash); MiniGameAudioAnimatorExcel.AddVoiceNamePrefix(builder, VoiceNamePrefixOffset); MiniGameAudioAnimatorExcel.AddControllerNameHash(builder, ControllerNameHash); MiniGameAudioAnimatorExcel.AddIgnoreInterruptPlay(builder, IgnoreInterruptPlay); MiniGameAudioAnimatorExcel.AddIgnoreInterruptDelay(builder, IgnoreInterruptDelay); return MiniGameAudioAnimatorExcel.EndMiniGameAudioAnimatorExcel(builder); } public static void StartMiniGameAudioAnimatorExcel(FlatBufferBuilder builder) { builder.StartTable(11); } public static void AddControllerNameHash(FlatBufferBuilder builder, uint controllerNameHash) { builder.AddUint(0, controllerNameHash, 0); } public static void AddVoiceNamePrefix(FlatBufferBuilder builder, StringOffset voiceNamePrefixOffset) { builder.AddOffset(1, voiceNamePrefixOffset.Value, 0); } public static void AddStateNameHash(FlatBufferBuilder builder, uint stateNameHash) { builder.AddUint(2, stateNameHash, 0); } public static void AddStateName(FlatBufferBuilder builder, StringOffset stateNameOffset) { builder.AddOffset(3, stateNameOffset.Value, 0); } public static void AddIgnoreInterruptDelay(FlatBufferBuilder builder, bool ignoreInterruptDelay) { builder.AddBool(4, ignoreInterruptDelay, false); } public static void AddIgnoreInterruptPlay(FlatBufferBuilder builder, bool ignoreInterruptPlay) { builder.AddBool(5, ignoreInterruptPlay, false); } public static void AddVolume(FlatBufferBuilder builder, float volume) { builder.AddFloat(6, volume, 0.0f); } public static void AddDelay(FlatBufferBuilder builder, float delay) { builder.AddFloat(7, delay, 0.0f); } public static void AddAudioPriority(FlatBufferBuilder builder, int audioPriority) { builder.AddInt(8, audioPriority, 0); } public static void AddAudioClipPath(FlatBufferBuilder builder, VectorOffset audioClipPathOffset) { builder.AddOffset(9, audioClipPathOffset.Value, 0); } public static VectorOffset CreateAudioClipPathVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } public static VectorOffset CreateAudioClipPathVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateAudioClipPathVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateAudioClipPathVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartAudioClipPathVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddVoiceHash(FlatBufferBuilder builder, VectorOffset voiceHashOffset) { builder.AddOffset(10, voiceHashOffset.Value, 0); } public static VectorOffset CreateVoiceHashVector(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 CreateVoiceHashVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVoiceHashVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVoiceHashVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartVoiceHashVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndMiniGameAudioAnimatorExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MiniGameAudioAnimatorExcelT UnPack() { var _o = new MiniGameAudioAnimatorExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MiniGameAudioAnimatorExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MiniGameAudioAnimator"); _o.ControllerNameHash = TableEncryptionService.Convert(this.ControllerNameHash, key); _o.VoiceNamePrefix = TableEncryptionService.Convert(this.VoiceNamePrefix, key); _o.StateNameHash = TableEncryptionService.Convert(this.StateNameHash, key); _o.StateName = TableEncryptionService.Convert(this.StateName, key); _o.IgnoreInterruptDelay = TableEncryptionService.Convert(this.IgnoreInterruptDelay, key); _o.IgnoreInterruptPlay = TableEncryptionService.Convert(this.IgnoreInterruptPlay, key); _o.Volume = TableEncryptionService.Convert(this.Volume, key); _o.Delay = TableEncryptionService.Convert(this.Delay, key); _o.AudioPriority = TableEncryptionService.Convert(this.AudioPriority, key); _o.AudioClipPath = new List(); for (var _j = 0; _j < this.AudioClipPathLength; ++_j) {_o.AudioClipPath.Add(TableEncryptionService.Convert(this.AudioClipPath(_j), key));} _o.VoiceHash = new List(); for (var _j = 0; _j < this.VoiceHashLength; ++_j) {_o.VoiceHash.Add(TableEncryptionService.Convert(this.VoiceHash(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, MiniGameAudioAnimatorExcelT _o) { if (_o == null) return default(Offset); var _VoiceNamePrefix = _o.VoiceNamePrefix == null ? default(StringOffset) : builder.CreateString(_o.VoiceNamePrefix); var _StateName = _o.StateName == null ? default(StringOffset) : builder.CreateString(_o.StateName); var _AudioClipPath = default(VectorOffset); if (_o.AudioClipPath != null) { var __AudioClipPath = new StringOffset[_o.AudioClipPath.Count]; for (var _j = 0; _j < __AudioClipPath.Length; ++_j) { __AudioClipPath[_j] = builder.CreateString(_o.AudioClipPath[_j]); } _AudioClipPath = CreateAudioClipPathVector(builder, __AudioClipPath); } var _VoiceHash = default(VectorOffset); if (_o.VoiceHash != null) { var __VoiceHash = _o.VoiceHash.ToArray(); _VoiceHash = CreateVoiceHashVector(builder, __VoiceHash); } return CreateMiniGameAudioAnimatorExcel( builder, _o.ControllerNameHash, _VoiceNamePrefix, _o.StateNameHash, _StateName, _o.IgnoreInterruptDelay, _o.IgnoreInterruptPlay, _o.Volume, _o.Delay, _o.AudioPriority, _AudioClipPath, _VoiceHash); } } public class MiniGameAudioAnimatorExcelT { public uint ControllerNameHash { get; set; } public string VoiceNamePrefix { get; set; } public uint StateNameHash { get; set; } public string StateName { get; set; } public bool IgnoreInterruptDelay { get; set; } public bool IgnoreInterruptPlay { get; set; } public float Volume { get; set; } public float Delay { get; set; } public int AudioPriority { get; set; } public List AudioClipPath { get; set; } public List VoiceHash { get; set; } public MiniGameAudioAnimatorExcelT() { this.ControllerNameHash = 0; this.VoiceNamePrefix = null; this.StateNameHash = 0; this.StateName = null; this.IgnoreInterruptDelay = false; this.IgnoreInterruptPlay = false; this.Volume = 0.0f; this.Delay = 0.0f; this.AudioPriority = 0; this.AudioClipPath = null; this.VoiceHash = null; } } static public class MiniGameAudioAnimatorExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*ControllerNameHash*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 6 /*VoiceNamePrefix*/, false) && verifier.VerifyField(tablePos, 8 /*StateNameHash*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 10 /*StateName*/, false) && verifier.VerifyField(tablePos, 12 /*IgnoreInterruptDelay*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 14 /*IgnoreInterruptPlay*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 16 /*Volume*/, 4 /*float*/, 4, false) && verifier.VerifyField(tablePos, 18 /*Delay*/, 4 /*float*/, 4, false) && verifier.VerifyField(tablePos, 20 /*AudioPriority*/, 4 /*int*/, 4, false) && verifier.VerifyVectorOfStrings(tablePos, 22 /*AudioClipPath*/, false) && verifier.VerifyVectorOfData(tablePos, 24 /*VoiceHash*/, 4 /*uint*/, false) && verifier.VerifyTableEnd(tablePos); } } }