コード例 #1
0
 def __init__(self, x, y, width, height, speed, angle, color):
     
     Prey.__init__(self, x, y, width, height, angle, speed)
     
     self._x = x
     self._y = y
     self._width = width * 2
     self._height = height * 2
     self._speed = speed
     self._angle = angle
     self._color = color
     
     Prey.randomize_angle(self)
コード例 #2
0
ファイル: floater.py プロジェクト: jichenqing/BallSimulation
    def __init__(self, x, y):
        Prey.randomize_angle(self)

        Prey.__init__(self, x, y, 10, 10, Prey.get_angle(self), 5)
コード例 #3
0
 def __init__(self, x, y):
     self._image = PhotoImage(file='ufo.gif')
     ball = Prey(x, y, 10, 10, 1, 5)
     ball.randomize_angle()
     ang = ball.get_angle()
     Prey.__init__(self, x, y, 10, 10, ang, 5)
コード例 #4
0
 def __init__(self, x, y, width=10, height=10, angle=1, speed=5):
     Prey.__init__(self, x, y, width, height, angle, speed)
     Prey.randomize_angle(self)
コード例 #5
0
 def __init__(self, x, y):
     ball = Prey(x, y, 10, 10, 1, 5)
     ball.randomize_angle()
     ang = ball.get_angle()
     Prey.__init__(self, x, y, 10, 10, ang, 5)
コード例 #6
0
 def __init__(self, x, y):
     aPrey = Prey(x, y, 10, 10, 1, 5)
     aPrey.randomize_angle()
     Prey.__init__(self, x, y, 10, 10, aPrey.get_angle(), 5)
     self._color = 'blue'
コード例 #7
0
 def __init__(self,x,y):
     self._image = PhotoImage(file='ufo.gif')
     Prey.__init__(self,x,y,self._image.width(),self._image.height(),0,5)
     Prey.randomize_angle(self)
コード例 #8
0
 def __init__(self, x, y):
     aPrey = Prey(x, y, 10, 10, 1, 5)
     aPrey.randomize_angle()
     Prey.__init__(self, x, y, 10, 10, aPrey.get_angle(),
                   random.randint(3, 7))
     self._color = 'red'
コード例 #9
0
 def __init__(self, x, y):
     Prey.randomize_angle(self)  # Ball for random angles
     Prey.__init__(self, x, y, 10, 10, Prey.get_angle(self), 5)