# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

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

    # TriggerCollision
    def ColliderId(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # TriggerCollision
    def CollideeId(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # TriggerCollision
    def TriggerId(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # TriggerCollision
    def State(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
        return 1

def TriggerCollisionStart(builder): builder.StartObject(4)
def TriggerCollisionAddColliderId(builder, colliderId): builder.PrependInt32Slot(0, colliderId, 0)
def TriggerCollisionAddCollideeId(builder, collideeId): builder.PrependInt32Slot(1, collideeId, 0)
def TriggerCollisionAddTriggerId(builder, triggerId): builder.PrependInt32Slot(2, triggerId, 0)
def TriggerCollisionAddState(builder, state): builder.PrependUint8Slot(3, state, 1)
def TriggerCollisionEnd(builder): return builder.EndObject()
