def flip(self, flip_direction = CLOCKWISE): if flip_direction == CLOCKWISE: self.attached = cycle_clockwise(self.attached) else: self.attached = cycle_counter_clockwise(self.attached) DynamicObject.flip(self, flip_direction) return
def flip(self, flip_direction = CLOCKWISE): if flip_direction == CLOCKWISE: self.saveddx = -self.dy self.saveddy = self.dx else: self.saveddx = self.dy self.saveddy = -self.dx DynamicObject.flip(self, flip_direction) return
def flip(self, flip_direction = CLOCKWISE): #Position correction - Guy's collision shape isn't an exact square, #so this is needed to avoid unwanted collisions after flipping self.y += 2 xmod = 20 - self.x % TILE_DIM if abs(xmod) < 6: #Guy hasn't crossed over to another (empty) tile, but isn't centered #- a chance of a post-flip collision self.x += xmod DynamicObject.flip(self, flip_direction) if self.current_animation == "arrow": self.current_animation = "default" return