// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package report

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type Science struct {
	_tab flatbuffers.Table
}

func GetRootAsScience(buf []byte, offset flatbuffers.UOffsetT) *Science {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &Science{}
	x.Init(buf, n+offset)
	return x
}

func FinishScienceBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.Finish(offset)
}

func GetSizePrefixedRootAsScience(buf []byte, offset flatbuffers.UOffsetT) *Science {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &Science{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func FinishSizePrefixedScienceBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.FinishSizePrefixed(offset)
}

func (rcv *Science) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *Science) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *Science) Name() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *Science) Drive() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Science) MutateDrive(n float32) bool {
	return rcv._tab.MutateFloat32Slot(6, n)
}

func (rcv *Science) Weapons() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Science) MutateWeapons(n float32) bool {
	return rcv._tab.MutateFloat32Slot(8, n)
}

func (rcv *Science) Shields() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Science) MutateShields(n float32) bool {
	return rcv._tab.MutateFloat32Slot(10, n)
}

func (rcv *Science) Cargo() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Science) MutateCargo(n float32) bool {
	return rcv._tab.MutateFloat32Slot(12, n)
}

func ScienceStart(builder *flatbuffers.Builder) {
	builder.StartObject(5)
}
func ScienceAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func ScienceAddDrive(builder *flatbuffers.Builder, drive float32) {
	builder.PrependFloat32Slot(1, drive, 0.0)
}
func ScienceAddWeapons(builder *flatbuffers.Builder, weapons float32) {
	builder.PrependFloat32Slot(2, weapons, 0.0)
}
func ScienceAddShields(builder *flatbuffers.Builder, shields float32) {
	builder.PrependFloat32Slot(3, shields, 0.0)
}
func ScienceAddCargo(builder *flatbuffers.Builder, cargo float32) {
	builder.PrependFloat32Slot(4, cargo, 0.0)
}
func ScienceEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
