def METHOD_NAME(self, delta_time: float):
    new_position = (
        self.player_sprite.center_x + self.x_direction * delta_time,
        self.player_sprite.center_y + self.y_direction * delta_time,
    )
    self.player_sprite.position = new_position
    # When the player is near x = SCREEN_WIDTH we transition between the two backgrounds.
    if SCREEN_WIDTH - 100 < self.player_sprite.center_x < SCREEN_WIDTH + 100:
        percent = (self.player_sprite.center_x - (SCREEN_WIDTH - 50)) / 200
        self.background_1.blend_layer(self.background_2, percent)
    self.pan_camera_to_player()