SCHALE.GameServer/SCHALE.Common/FlatData/ScenarioTransitionExcel.cs

158 lines
8.8 KiB
C#
Raw Permalink Normal View History

2024-04-21 00:21:57 +00:00
// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace SCHALE.Common.FlatData
{
using global::System;
using global::System.Collections.Generic;
2024-04-29 15:52:45 +00:00
using global::SCHALE.Common.Crypto;
2024-04-21 00:21:57 +00:00
using global::Google.FlatBuffers;
public struct ScenarioTransitionExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ScenarioTransitionExcel GetRootAsScenarioTransitionExcel(ByteBuffer _bb) { return GetRootAsScenarioTransitionExcel(_bb, new ScenarioTransitionExcel()); }
public static ScenarioTransitionExcel GetRootAsScenarioTransitionExcel(ByteBuffer _bb, ScenarioTransitionExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ScenarioTransitionExcel __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 TransitionOut { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTransitionOutBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetTransitionOutBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetTransitionOutArray() { return __p.__vector_as_array<byte>(6); }
public long TransitionOutDuration { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string TransitionOutResource { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTransitionOutResourceBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetTransitionOutResourceBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetTransitionOutResourceArray() { return __p.__vector_as_array<byte>(10); }
public string TransitionIn { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTransitionInBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
public ArraySegment<byte>? GetTransitionInBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetTransitionInArray() { return __p.__vector_as_array<byte>(12); }
public long TransitionInDuration { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string TransitionInResource { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTransitionInResourceBytes() { return __p.__vector_as_span<byte>(16, 1); }
#else
public ArraySegment<byte>? GetTransitionInResourceBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public byte[] GetTransitionInResourceArray() { return __p.__vector_as_array<byte>(16); }
public static Offset<SCHALE.Common.FlatData.ScenarioTransitionExcel> CreateScenarioTransitionExcel(FlatBufferBuilder builder,
uint Name = 0,
StringOffset TransitionOutOffset = default(StringOffset),
long TransitionOutDuration = 0,
StringOffset TransitionOutResourceOffset = default(StringOffset),
StringOffset TransitionInOffset = default(StringOffset),
long TransitionInDuration = 0,
StringOffset TransitionInResourceOffset = default(StringOffset)) {
builder.StartTable(7);
ScenarioTransitionExcel.AddTransitionInDuration(builder, TransitionInDuration);
ScenarioTransitionExcel.AddTransitionOutDuration(builder, TransitionOutDuration);
ScenarioTransitionExcel.AddTransitionInResource(builder, TransitionInResourceOffset);
ScenarioTransitionExcel.AddTransitionIn(builder, TransitionInOffset);
ScenarioTransitionExcel.AddTransitionOutResource(builder, TransitionOutResourceOffset);
ScenarioTransitionExcel.AddTransitionOut(builder, TransitionOutOffset);
ScenarioTransitionExcel.AddName(builder, Name);
return ScenarioTransitionExcel.EndScenarioTransitionExcel(builder);
}
public static void StartScenarioTransitionExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
public static void AddTransitionOut(FlatBufferBuilder builder, StringOffset transitionOutOffset) { builder.AddOffset(1, transitionOutOffset.Value, 0); }
public static void AddTransitionOutDuration(FlatBufferBuilder builder, long transitionOutDuration) { builder.AddLong(2, transitionOutDuration, 0); }
public static void AddTransitionOutResource(FlatBufferBuilder builder, StringOffset transitionOutResourceOffset) { builder.AddOffset(3, transitionOutResourceOffset.Value, 0); }
public static void AddTransitionIn(FlatBufferBuilder builder, StringOffset transitionInOffset) { builder.AddOffset(4, transitionInOffset.Value, 0); }
public static void AddTransitionInDuration(FlatBufferBuilder builder, long transitionInDuration) { builder.AddLong(5, transitionInDuration, 0); }
public static void AddTransitionInResource(FlatBufferBuilder builder, StringOffset transitionInResourceOffset) { builder.AddOffset(6, transitionInResourceOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.ScenarioTransitionExcel> EndScenarioTransitionExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.ScenarioTransitionExcel>(o);
}
2024-04-29 15:52:45 +00:00
public ScenarioTransitionExcelT UnPack() {
var _o = new ScenarioTransitionExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ScenarioTransitionExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ScenarioTransition");
_o.Name = TableEncryptionService.Convert(this.Name, key);
_o.TransitionOut = TableEncryptionService.Convert(this.TransitionOut, key);
_o.TransitionOutDuration = TableEncryptionService.Convert(this.TransitionOutDuration, key);
_o.TransitionOutResource = TableEncryptionService.Convert(this.TransitionOutResource, key);
_o.TransitionIn = TableEncryptionService.Convert(this.TransitionIn, key);
_o.TransitionInDuration = TableEncryptionService.Convert(this.TransitionInDuration, key);
_o.TransitionInResource = TableEncryptionService.Convert(this.TransitionInResource, key);
}
public static Offset<SCHALE.Common.FlatData.ScenarioTransitionExcel> Pack(FlatBufferBuilder builder, ScenarioTransitionExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ScenarioTransitionExcel>);
var _TransitionOut = _o.TransitionOut == null ? default(StringOffset) : builder.CreateString(_o.TransitionOut);
var _TransitionOutResource = _o.TransitionOutResource == null ? default(StringOffset) : builder.CreateString(_o.TransitionOutResource);
var _TransitionIn = _o.TransitionIn == null ? default(StringOffset) : builder.CreateString(_o.TransitionIn);
var _TransitionInResource = _o.TransitionInResource == null ? default(StringOffset) : builder.CreateString(_o.TransitionInResource);
return CreateScenarioTransitionExcel(
builder,
_o.Name,
_TransitionOut,
_o.TransitionOutDuration,
_TransitionOutResource,
_TransitionIn,
_o.TransitionInDuration,
_TransitionInResource);
}
}
public class ScenarioTransitionExcelT
{
public uint Name { get; set; }
public string TransitionOut { get; set; }
public long TransitionOutDuration { get; set; }
public string TransitionOutResource { get; set; }
public string TransitionIn { get; set; }
public long TransitionInDuration { get; set; }
public string TransitionInResource { get; set; }
public ScenarioTransitionExcelT() {
this.Name = 0;
this.TransitionOut = null;
this.TransitionOutDuration = 0;
this.TransitionOutResource = null;
this.TransitionIn = null;
this.TransitionInDuration = 0;
this.TransitionInResource = null;
}
2024-04-21 00:21:57 +00:00
}
static public class ScenarioTransitionExcelVerify
{
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 /*TransitionOut*/, false)
&& verifier.VerifyField(tablePos, 8 /*TransitionOutDuration*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 10 /*TransitionOutResource*/, false)
&& verifier.VerifyString(tablePos, 12 /*TransitionIn*/, false)
&& verifier.VerifyField(tablePos, 14 /*TransitionInDuration*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 16 /*TransitionInResource*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}