def __init__ (self, world, pos, vel, radius = conf.ASTEROID['max radius'], density = conf.ASTEROID['density']): self.world = world GravitySink.__init__(self, pos, vel, density * radius ** 3, radius) self.graphic = Graphic('asteroid.png', (ir(pos[0] - radius), ir(pos[1] - radius))) self.graphic = mk_graphic(self) position_graphic(self)
def move (self, phys, t): GravitySink.move(self, phys, t) x, y = self.pos position_graphic(self)