def flip(self, flip_direction=CLOCKWISE):
     VisibleObject.flip(self, flip_direction)
     if flip_direction == CLOCKWISE:
         tempx = self.tilex
         self.tilex = FULL_TILES_VER - self.tiley - 1
         self.tiley = tempx
     else:
         tempy = self.tiley
         self.tiley = FULL_TILES_HOR - self.tilex - 1
         self.tilex = tempy
示例#2
0
 def flip(self, flip_direction = CLOCKWISE):
   """Make the object flip with the level to either direction"""
   if VisibleObject.flip(self, flip_direction):
     if flip_direction == CLOCKWISE:
       self.initial_x, self.initial_y = -self.initial_y + PLAY_AREA_WIDTH / TILES_HOR * (TILES_HOR*2 - FULL_TILES_HOR), self.initial_x
     else:
       self.initial_x, self.initial_y = self.initial_y, -self.initial_x + PLAY_AREA_WIDTH / TILES_HOR * (TILES_HOR*2 - FULL_TILES_HOR)
   return