コード例 #1
0
ファイル: game01.py プロジェクト: zenki2001cn/SnippetCode
    def initialize(self):
        self.set_background(color=BLUE)

        thing = Circle(color=GREEN)
        path = SquarePath(duration=10)
        thing.set_path(path)
        self.sprites.add(thing)
コード例 #2
0
ファイル: pathNGtest.py プロジェクト: zenki2001cn/SnippetCode
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)
コード例 #3
0
ファイル: grow.py プロジェクト: zenki2001cn/SnippetCode
    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)
コード例 #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)
コード例 #5
0
ファイル: layers.py プロジェクト: zenki2001cn/SnippetCode
 def move(self):
     x, y = self.get_position()
     #print 'moving', x, y
     Circle.move(self)
コード例 #6
0
ファイル: visual.py プロジェクト: anthony-niklas/Tank-AI
 def __init__(self, pos):
     r = conf.explosion_radii[-1] 
     rt = r * m
     Circle.__init__(self, radius=rt)
     self.setpos(pos)
コード例 #7
0
ファイル: grow.py プロジェクト: zenki2001cn/SnippetCode
 def __init__(self):
     Circle.__init__(self, color=GREEN)
     self.get_big = 1
     self.dx = 5