# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

class DesiredGameInfoState(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsDesiredGameInfoState(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = DesiredGameInfoState()
        x.Init(buf, n + offset)
        return x

    # DesiredGameInfoState
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # DesiredGameInfoState
    def WorldGravityZ(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = o + self._tab.Pos
            from .Float import Float
            obj = Float()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # DesiredGameInfoState
    def GameSpeed(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            x = o + self._tab.Pos
            from .Float import Float
            obj = Float()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # DesiredGameInfoState
    def Paused(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            x = o + self._tab.Pos
            from .Bool import Bool
            obj = Bool()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # DesiredGameInfoState
    def EndMatch(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            x = o + self._tab.Pos
            from .Bool import Bool
            obj = Bool()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

def DesiredGameInfoStateStart(builder): builder.StartObject(4)
def DesiredGameInfoStateAddWorldGravityZ(builder, worldGravityZ): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(worldGravityZ), 0)
def DesiredGameInfoStateAddGameSpeed(builder, gameSpeed): builder.PrependStructSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(gameSpeed), 0)
def DesiredGameInfoStateAddPaused(builder, paused): builder.PrependStructSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(paused), 0)
def DesiredGameInfoStateAddEndMatch(builder, endMatch): builder.PrependStructSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(endMatch), 0)
def DesiredGameInfoStateEnd(builder): return builder.EndObject()
