예제 #1
0
파일: weapons.py 프로젝트: jaegr/jrats
 def handle_collision(self, rat):
     rat.change_direction(self) 
예제 #2
0
파일: weapons.py 프로젝트: jaegr/jrats
 def handle_collision(self, rat):
     #change_direction() returns either True or False depending on if the rat changed direction. Only decrease hits_left if rat changed direction
     if rat.change_direction(self): 
         self.hits_left -= 1
         if self.hits_left <= 0:
             self.delete()