Exemple #1
0
    def initialize(self):
        self.set_background(color=BLUE)

        thing = Circle(color=GREEN)
        path = SquarePath(duration=10)
        thing.set_path(path)
        self.sprites.add(thing)
class GG(Game):
    def initialize(self):
        self.set_background(color=BLUE)

        self.thing = Circle(color=GREEN)
        self.thing.center()
        self.thing.path.set_velocity(vx=50)
        self.thing.path.turn_right()
        self.sprites.add(self.thing)
Exemple #3
0
    def move(self):
        if self.get_big:
            if self.rect.w > 100:
                self.get_big = 0
                self.dx = -5

        else:
            if self.rect.w < 20:
                self.get_big = 1
                self.dx = 5

        self.stretch(dx=self.dx, keepAspectRatio=1)

        Circle.move(self)
Exemple #4
0
 def __init__(self, pos):
     r = conf.explosion_radii[-1]  # largest explosion radius
     rt = r * m
     Circle.__init__(self, radius=rt)
     self.setpos(pos)
Exemple #5
0
 def move(self):
     x, y = self.get_position()
     #print 'moving', x, y
     Circle.move(self)
Exemple #6
0
 def __init__(self, pos):
     r = conf.explosion_radii[-1] 
     rt = r * m
     Circle.__init__(self, radius=rt)
     self.setpos(pos)
Exemple #7
0
 def __init__(self):
     Circle.__init__(self, color=GREEN)
     self.get_big = 1
     self.dx = 5