304 lines
7.9 KiB
Go
304 lines
7.9 KiB
Go
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
|
|
|
package gmb
|
|
|
|
import (
|
|
flatbuffers "github.com/google/flatbuffers/go"
|
|
)
|
|
|
|
type EntitySnapshot struct {
|
|
_tab flatbuffers.Table
|
|
}
|
|
|
|
func GetRootAsEntitySnapshot(buf []byte, offset flatbuffers.UOffsetT) *EntitySnapshot {
|
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
|
x := &EntitySnapshot{}
|
|
x.Init(buf, n+offset)
|
|
return x
|
|
}
|
|
|
|
func FinishEntitySnapshotBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
|
builder.Finish(offset)
|
|
}
|
|
|
|
func GetSizePrefixedRootAsEntitySnapshot(buf []byte, offset flatbuffers.UOffsetT) *EntitySnapshot {
|
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
|
x := &EntitySnapshot{}
|
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
|
return x
|
|
}
|
|
|
|
func FinishSizePrefixedEntitySnapshotBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
|
builder.FinishSizePrefixed(offset)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Init(buf []byte, i flatbuffers.UOffsetT) {
|
|
rcv._tab.Bytes = buf
|
|
rcv._tab.Pos = i
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Table() flatbuffers.Table {
|
|
return rcv._tab
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) RuntimeId() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateRuntimeId(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(4, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Uuid() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Type() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Name() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Dimension() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) X() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateX(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(14, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Y() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateY(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(16, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Z() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateZ(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(18, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Yaw() float32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateYaw(n float32) bool {
|
|
return rcv._tab.MutateFloat32Slot(20, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Pitch() float32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutatePitch(n float32) bool {
|
|
return rcv._tab.MutateFloat32Slot(22, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) VelocityX() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateVelocityX(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(24, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) VelocityY() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(26))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateVelocityY(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(26, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) VelocityZ() float64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(28))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat64(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateVelocityZ(n float64) bool {
|
|
return rcv._tab.MutateFloat64Slot(28, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Alive() bool {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(30))
|
|
if o != 0 {
|
|
return rcv._tab.GetBool(o + rcv._tab.Pos)
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateAlive(n bool) bool {
|
|
return rcv._tab.MutateBoolSlot(30, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Player() bool {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(32))
|
|
if o != 0 {
|
|
return rcv._tab.GetBool(o + rcv._tab.Pos)
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutatePlayer(n bool) bool {
|
|
return rcv._tab.MutateBoolSlot(32, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) HasHealth() bool {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(34))
|
|
if o != 0 {
|
|
return rcv._tab.GetBool(o + rcv._tab.Pos)
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateHasHealth(n bool) bool {
|
|
return rcv._tab.MutateBoolSlot(34, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) Health() float32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(36))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateHealth(n float32) bool {
|
|
return rcv._tab.MutateFloat32Slot(36, n)
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MaxHealth() float32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(38))
|
|
if o != 0 {
|
|
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
|
|
}
|
|
return 0.0
|
|
}
|
|
|
|
func (rcv *EntitySnapshot) MutateMaxHealth(n float32) bool {
|
|
return rcv._tab.MutateFloat32Slot(38, n)
|
|
}
|
|
|
|
func EntitySnapshotStart(builder *flatbuffers.Builder) {
|
|
builder.StartObject(18)
|
|
}
|
|
func EntitySnapshotAddRuntimeId(builder *flatbuffers.Builder, runtimeId int32) {
|
|
builder.PrependInt32Slot(0, runtimeId, 0)
|
|
}
|
|
func EntitySnapshotAddUuid(builder *flatbuffers.Builder, uuid flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(uuid), 0)
|
|
}
|
|
func EntitySnapshotAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(type_), 0)
|
|
}
|
|
func EntitySnapshotAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(name), 0)
|
|
}
|
|
func EntitySnapshotAddDimension(builder *flatbuffers.Builder, dimension flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(dimension), 0)
|
|
}
|
|
func EntitySnapshotAddX(builder *flatbuffers.Builder, x float64) {
|
|
builder.PrependFloat64Slot(5, x, 0.0)
|
|
}
|
|
func EntitySnapshotAddY(builder *flatbuffers.Builder, y float64) {
|
|
builder.PrependFloat64Slot(6, y, 0.0)
|
|
}
|
|
func EntitySnapshotAddZ(builder *flatbuffers.Builder, z float64) {
|
|
builder.PrependFloat64Slot(7, z, 0.0)
|
|
}
|
|
func EntitySnapshotAddYaw(builder *flatbuffers.Builder, yaw float32) {
|
|
builder.PrependFloat32Slot(8, yaw, 0.0)
|
|
}
|
|
func EntitySnapshotAddPitch(builder *flatbuffers.Builder, pitch float32) {
|
|
builder.PrependFloat32Slot(9, pitch, 0.0)
|
|
}
|
|
func EntitySnapshotAddVelocityX(builder *flatbuffers.Builder, velocityX float64) {
|
|
builder.PrependFloat64Slot(10, velocityX, 0.0)
|
|
}
|
|
func EntitySnapshotAddVelocityY(builder *flatbuffers.Builder, velocityY float64) {
|
|
builder.PrependFloat64Slot(11, velocityY, 0.0)
|
|
}
|
|
func EntitySnapshotAddVelocityZ(builder *flatbuffers.Builder, velocityZ float64) {
|
|
builder.PrependFloat64Slot(12, velocityZ, 0.0)
|
|
}
|
|
func EntitySnapshotAddAlive(builder *flatbuffers.Builder, alive bool) {
|
|
builder.PrependBoolSlot(13, alive, false)
|
|
}
|
|
func EntitySnapshotAddPlayer(builder *flatbuffers.Builder, player bool) {
|
|
builder.PrependBoolSlot(14, player, false)
|
|
}
|
|
func EntitySnapshotAddHasHealth(builder *flatbuffers.Builder, hasHealth bool) {
|
|
builder.PrependBoolSlot(15, hasHealth, false)
|
|
}
|
|
func EntitySnapshotAddHealth(builder *flatbuffers.Builder, health float32) {
|
|
builder.PrependFloat32Slot(16, health, 0.0)
|
|
}
|
|
func EntitySnapshotAddMaxHealth(builder *flatbuffers.Builder, maxHealth float32) {
|
|
builder.PrependFloat32Slot(17, maxHealth, 0.0)
|
|
}
|
|
func EntitySnapshotEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
|
return builder.EndObject()
|
|
}
|