comparison pytouhou/game/enemymanager.py @ 68:a2459defd4b6

Minor cleanup
author Thibaut Girka <thib@sitedethib.com>
date Fri, 26 Aug 2011 22:53:15 +0200
parents e2cb9d434dc2
children a142e57218a0
comparison
equal deleted inserted replaced
67:e2cb9d434dc2 68:a2459defd4b6
178 # superseeded by ins_97. 178 # superseeded by ins_97.
179 end_left, end_right, left, right = self.movement_dependant_sprites 179 end_left, end_right, left, right = self.movement_dependant_sprites
180 if x < self.x and self.direction != -1: 180 if x < self.x and self.direction != -1:
181 self.set_anim(left) 181 self.set_anim(left)
182 self.direction = -1 182 self.direction = -1
183 print('left')
184 elif x > self.x and self.direction != +1: 183 elif x > self.x and self.direction != +1:
185 self.set_anim(right) 184 self.set_anim(right)
186 self.direction = +1 185 self.direction = +1
187 print(left, right)
188 print('right')
189 elif x == self.x and self.direction is not None: 186 elif x == self.x and self.direction is not None:
190 self.set_anim({-1: end_left, +1: end_right}[self.direction]) 187 self.set_anim({-1: end_left, +1: end_right}[self.direction])
191 self.direction = None 188 self.direction = None
192 189
193 190