Ejemplo n.º 1
0
 def on_key_release(self, key: int, modifiers: int):
     """
     check for the last key to have been released, set the respective
     instance variable to false.
     :param key: the last key on the keyboard that the user let go of
     :param modifiers: n/a
     :return: n/a
     """
     if self.player.in_water:
         # the controls in water should only register when the key is released, unlike regular controls
         Controls.handle_water_controls(self)
     Controls.handle_key_release(self, key, modifiers)