roach.anchor = (-16, -16) # this should center them on the tile
roach.game_pos = (0, 0)
roach.health = 5
+ roach.angle = 0
roach.level = level
roach.move = partial(move, roach)
roach.last_moved = 0
if enemy and enemy is not roach:
continue
roach.game_pos = (roach.game_pos[0] + dx, roach.game_pos[1] + dy)
+ if dy == 1:
+ roach.angle = 180
+ elif dy == -1:
+ roach.angle = 0
+ elif dx == 1:
+ roach.angle = 270
+ else:
+ roach.angle = 90
break