示例#1
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
示例#2
0
文件: Ship.py 项目: ryvnphvng/Meteors
 def shoot(self):
     if self.time_reload <= 0:
         self.time_reload = 200 # TODO move this value out to a global constant
         Bullet.BulletObject(self)