예제 #1
0
 def collide(self, bubble):
     distance = Vector2.get_magnitude(entity.pos - self.pos)
     if distance < self.radius + bubble.radius:
         return True
     else:
         return False
예제 #2
0
 def is_collide(self, entity1, entity2):
     distance = Vector2.get_magnitude(entity1.pos - entity2.pos)
     if distance < entity1.radius + entity2.radius:
         return True
     else:
         return False