Пример #1
0
    def update(self, dt):
        self.ship.update()
        tmpCount = randint(1, 1800)
        if tmpCount > self.minProb:
            self.addAsteroid()
            if self.minProb < 1300:
                self.minProb = 1300
            self.nimProb = self.minProb - 1

        for k in self.asteroidList:
            if k.collide_widget(self.ship):
                print 'death'
                self.gameOver()
                Clock.unshcedule(self.update)
            k.update()
Пример #2
0
 def cancel_exception(self):
     '''Called to cancel the potentially scheduled exception, scheduled with
     :meth:`handle_exception`.
     '''
     Clock.unshcedule(self.exception_callback)
     self.exception_callback = None