Ejemplo n.º 1
0
 def create_meteors(self, time):
     if time / 5000 > self.asteroid_spawn_counter:
         self.asteroid_spawn_counter += 1
         spawn = time / 10000
         x = 0
         while x != spawn:
             Asteroid.AsteroidObject(self)
             x += 1
Ejemplo n.º 2
0
 def create_meteors(self, time):
     local_time = time - self.start_time
     if local_time / 5000 > self.asteroid_spawn_counter:
         self.asteroid_spawn_counter += 1
         spawn = local_time / 10000
         x = 0
         while x != spawn:
             Asteroid.AsteroidObject(self)
             x += 1
Ejemplo n.º 3
0
def MakeScreenObject(game, vals, id=None):
    if vals["is_alive"] == False:
        return None

    #print "make object"
    #return
    obj = None
    type = vals["type"]
    if type == "AsteroidObject":
        obj = Asteroid.AsteroidObject(game, id)
    if type == "ShipObject":
        obj = Ship.ShipObject(game, id)
    if type == "BulletObject":
        obj = Bullet.BulletObject(None, game)

    LoadScreenObject(obj, vals)
    return obj
Ejemplo n.º 4
0
 def create_meteors(self, time):
     local_time = time - self.start_time
     if local_time / 1000 > self.asteroid_spawn_counter:
         self.asteroid_spawn_counter += 1
         if self.count_living_objects() < 30:
             Asteroid.AsteroidObject(self)