SCHALE.GameServer/SCHALE.Common/FlatData/GroundVector3.cs

94 lines
3.5 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 GroundVector3 : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static GroundVector3 GetRootAsGroundVector3(ByteBuffer _bb) { return GetRootAsGroundVector3(_bb, new GroundVector3()); }
public static GroundVector3 GetRootAsGroundVector3(ByteBuffer _bb, GroundVector3 obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public GroundVector3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public float X { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public float Y { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public float Z { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public static Offset<SCHALE.Common.FlatData.GroundVector3> CreateGroundVector3(FlatBufferBuilder builder,
float X = 0.0f,
float Y = 0.0f,
float Z = 0.0f) {
builder.StartTable(3);
GroundVector3.AddZ(builder, Z);
GroundVector3.AddY(builder, Y);
GroundVector3.AddX(builder, X);
return GroundVector3.EndGroundVector3(builder);
}
public static void StartGroundVector3(FlatBufferBuilder builder) { builder.StartTable(3); }
public static void AddX(FlatBufferBuilder builder, float x) { builder.AddFloat(0, x, 0.0f); }
public static void AddY(FlatBufferBuilder builder, float y) { builder.AddFloat(1, y, 0.0f); }
public static void AddZ(FlatBufferBuilder builder, float z) { builder.AddFloat(2, z, 0.0f); }
public static Offset<SCHALE.Common.FlatData.GroundVector3> EndGroundVector3(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.GroundVector3>(o);
}
2024-04-29 15:52:45 +00:00
public GroundVector3T UnPack() {
var _o = new GroundVector3T();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(GroundVector3T _o) {
byte[] key = { 0 };
_o.X = TableEncryptionService.Convert(this.X, key);
_o.Y = TableEncryptionService.Convert(this.Y, key);
_o.Z = TableEncryptionService.Convert(this.Z, key);
}
public static Offset<SCHALE.Common.FlatData.GroundVector3> Pack(FlatBufferBuilder builder, GroundVector3T _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.GroundVector3>);
return CreateGroundVector3(
builder,
_o.X,
_o.Y,
_o.Z);
}
}
public class GroundVector3T
{
public float X { get; set; }
public float Y { get; set; }
public float Z { get; set; }
public GroundVector3T() {
this.X = 0.0f;
this.Y = 0.0f;
this.Z = 0.0f;
}
2024-04-21 00:21:57 +00:00
}
static public class GroundVector3Verify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*X*/, 4 /*float*/, 4, false)
&& verifier.VerifyField(tablePos, 6 /*Y*/, 4 /*float*/, 4, false)
&& verifier.VerifyField(tablePos, 8 /*Z*/, 4 /*float*/, 4, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}