Ejemplo n.º 1
0
 def _collide_with_planet(self, rect):
     c = Circle(self.planet.rect.centerx, self.planet.rect.centery, self.planet.radius)
     if not c.intersects_rect(rect):
         return False
     self._adjust_angle(-self._get_angle_planet() * (180/pi))
     self.landed = True
     return True
Ejemplo n.º 2
0
 def _collide_with_planet(self, rect):
     c = Circle(self.planet.rect.centerx, self.planet.rect.centery,
                self.planet.radius)
     if not c.intersects_rect(rect):
         return False
     self._adjust_angle(-self._get_angle_planet() * (180 / pi))
     self.landed = True
     return True
Ejemplo n.º 3
0
 def _collide_with_planet(self, rect):
     for planet in PLANET_MANAGER.instance.sprites():
         c = Circle(planet.rect.centerx, planet.rect.centery, planet.radius)
         if c.intersects_rect(rect):
             return True
Ejemplo n.º 4
0
 def _collide_with_planet(self, rect):
     for planet in PLANET_MANAGER.instance.sprites():
         c = Circle(planet.rect.centerx, planet.rect.centery, planet.radius)
         if c.intersects_rect(rect):
             return True