'Mario\'s state and animation when he shrinks from big to small
after colliding with an enemy'

def changing_to_small(self):

    self.in_transition_state = True
    self.hurt_invincible = True
    self.state = c.BIG_TO_SMALL
    if self.facing_right:
        frames = [self.right_big_normal_frames[4], self.right_big_normal_frames[8], self.right_small_normal_frames[8]]
    else:
        frames = [self.left_big_normal_frames[4], self.left_big_normal_frames[8], self.left_small_normal_frames[8]]
    if (self.transition_timer == 0):
        self.transition_timer = self.current_time
    elif ((self.current_time - self.transition_timer) < 265):
        self.image = frames[0]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 330):
        self.image = frames[1]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 395):
        self.image = frames[2]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 460):
        self.image = frames[1]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 525):
        self.image = frames[2]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 590):
        self.image = frames[1]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 655):
        self.image = frames[2]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 720):
        self.image = frames[1]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 785):
        self.image = frames[2]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 850):
        self.image = frames[1]
        self.hurt_invincible_check()
        self.adjust_rect()
    elif ((self.current_time - self.transition_timer) < 915):
        self.image = frames[2]
        self.adjust_rect()
        self.in_transition_state = False
        self.state = c.WALK
        self.big = False
        self.transition_timer = 0
        self.hurt_invisible_timer = 0
        self.become_small()
