Beispiel #1
0
class KeyParameter(ParameterCommon):
    key = None

    def read(self, reader):
        self.key = Key(reader.readShort())

    def write(self, reader):
        reader.writeShort(self.key.getValue())
Beispiel #2
0
class KeyParameter(ParameterCommon):
    def __init__(self, reader: ByteIO):
        self.reader = reader
        self.key = None

    def read(self):
        reader = self.reader
        self.key = Key(reader.read_int16())

    def write(self, reader: ByteIO):
        reader.write_int16(self.key.getValue())