SCHALE.GameServer/SCHALE.Common/FlatData/ScenarioBGEffectExcel.cs

144 lines
7.2 KiB
C#

// <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;
using global::SCHALE.Common.Crypto;
using global::Google.FlatBuffers;
public struct ScenarioBGEffectExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ScenarioBGEffectExcel GetRootAsScenarioBGEffectExcel(ByteBuffer _bb) { return GetRootAsScenarioBGEffectExcel(_bb, new ScenarioBGEffectExcel()); }
public static ScenarioBGEffectExcel GetRootAsScenarioBGEffectExcel(ByteBuffer _bb, ScenarioBGEffectExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ScenarioBGEffectExcel __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 Effect { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetEffectBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetEffectBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetEffectArray() { return __p.__vector_as_array<byte>(6); }
public string Effect2 { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetEffect2Bytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetEffect2Bytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetEffect2Array() { return __p.__vector_as_array<byte>(8); }
public SCHALE.Common.FlatData.ScenarioBGScroll Scroll { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ScenarioBGScroll)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioBGScroll.None; } }
public long ScrollTime { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long ScrollFrom { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long ScrollTo { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public static Offset<SCHALE.Common.FlatData.ScenarioBGEffectExcel> CreateScenarioBGEffectExcel(FlatBufferBuilder builder,
uint Name = 0,
StringOffset EffectOffset = default(StringOffset),
StringOffset Effect2Offset = default(StringOffset),
SCHALE.Common.FlatData.ScenarioBGScroll Scroll = SCHALE.Common.FlatData.ScenarioBGScroll.None,
long ScrollTime = 0,
long ScrollFrom = 0,
long ScrollTo = 0) {
builder.StartTable(7);
ScenarioBGEffectExcel.AddScrollTo(builder, ScrollTo);
ScenarioBGEffectExcel.AddScrollFrom(builder, ScrollFrom);
ScenarioBGEffectExcel.AddScrollTime(builder, ScrollTime);
ScenarioBGEffectExcel.AddScroll(builder, Scroll);
ScenarioBGEffectExcel.AddEffect2(builder, Effect2Offset);
ScenarioBGEffectExcel.AddEffect(builder, EffectOffset);
ScenarioBGEffectExcel.AddName(builder, Name);
return ScenarioBGEffectExcel.EndScenarioBGEffectExcel(builder);
}
public static void StartScenarioBGEffectExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
public static void AddEffect(FlatBufferBuilder builder, StringOffset effectOffset) { builder.AddOffset(1, effectOffset.Value, 0); }
public static void AddEffect2(FlatBufferBuilder builder, StringOffset effect2Offset) { builder.AddOffset(2, effect2Offset.Value, 0); }
public static void AddScroll(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioBGScroll scroll) { builder.AddInt(3, (int)scroll, 0); }
public static void AddScrollTime(FlatBufferBuilder builder, long scrollTime) { builder.AddLong(4, scrollTime, 0); }
public static void AddScrollFrom(FlatBufferBuilder builder, long scrollFrom) { builder.AddLong(5, scrollFrom, 0); }
public static void AddScrollTo(FlatBufferBuilder builder, long scrollTo) { builder.AddLong(6, scrollTo, 0); }
public static Offset<SCHALE.Common.FlatData.ScenarioBGEffectExcel> EndScenarioBGEffectExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.ScenarioBGEffectExcel>(o);
}
public ScenarioBGEffectExcelT UnPack() {
var _o = new ScenarioBGEffectExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ScenarioBGEffectExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ScenarioBGEffect");
_o.Name = TableEncryptionService.Convert(this.Name, key);
_o.Effect = TableEncryptionService.Convert(this.Effect, key);
_o.Effect2 = TableEncryptionService.Convert(this.Effect2, key);
_o.Scroll = TableEncryptionService.Convert(this.Scroll, key);
_o.ScrollTime = TableEncryptionService.Convert(this.ScrollTime, key);
_o.ScrollFrom = TableEncryptionService.Convert(this.ScrollFrom, key);
_o.ScrollTo = TableEncryptionService.Convert(this.ScrollTo, key);
}
public static Offset<SCHALE.Common.FlatData.ScenarioBGEffectExcel> Pack(FlatBufferBuilder builder, ScenarioBGEffectExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ScenarioBGEffectExcel>);
var _Effect = _o.Effect == null ? default(StringOffset) : builder.CreateString(_o.Effect);
var _Effect2 = _o.Effect2 == null ? default(StringOffset) : builder.CreateString(_o.Effect2);
return CreateScenarioBGEffectExcel(
builder,
_o.Name,
_Effect,
_Effect2,
_o.Scroll,
_o.ScrollTime,
_o.ScrollFrom,
_o.ScrollTo);
}
}
public class ScenarioBGEffectExcelT
{
public uint Name { get; set; }
public string Effect { get; set; }
public string Effect2 { get; set; }
public SCHALE.Common.FlatData.ScenarioBGScroll Scroll { get; set; }
public long ScrollTime { get; set; }
public long ScrollFrom { get; set; }
public long ScrollTo { get; set; }
public ScenarioBGEffectExcelT() {
this.Name = 0;
this.Effect = null;
this.Effect2 = null;
this.Scroll = SCHALE.Common.FlatData.ScenarioBGScroll.None;
this.ScrollTime = 0;
this.ScrollFrom = 0;
this.ScrollTo = 0;
}
}
static public class ScenarioBGEffectExcelVerify
{
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 /*Effect*/, false)
&& verifier.VerifyString(tablePos, 8 /*Effect2*/, false)
&& verifier.VerifyField(tablePos, 10 /*Scroll*/, 4 /*SCHALE.Common.FlatData.ScenarioBGScroll*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*ScrollTime*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*ScrollFrom*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 16 /*ScrollTo*/, 8 /*long*/, 8, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}