本文整理汇总了Python中ship.Ship.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Ship.__init__方法的具体用法?Python Ship.__init__怎么用?Python Ship.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ship.Ship
的用法示例。
在下文中一共展示了Ship.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, position=None, colour=None,
projectile_pool=None, player_id=-1, name=""):
Ship.__init__(self, position, colour, projectile_pool)
self.id = player_id
self.name = name
self.destroyed = False
self.respawn_in = -1
示例2: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, game):
Ship.__init__(self, game, 0, twoStage=True)
self.fixedPos = self.pos = (400, 300)
self.accel = (0, 0)
self.accelFactor = 0.4
self.turning = 0
self.shooting = False
self.shootCounter = 0
示例3: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, *args, **kargs):
if not Destructor.img:
Destructor.img = pygame.image.load("../media/destructor.png").convert_alpha()
Ship.__init__(self, Destructor.img, *args, score = 200,
projectile = Missile, health = 200,
density = 0.85, **kargs)
示例4: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, **kwargs):
Ship.__init__(self, **kwargs)
self.hull = FighterHull()
self["hits"] = 100
self.addComponent(TieEngine())
self.addComponent(TieEngine())
self.addComponent(TieBlaster())
self.addComponent(TieBlaster())
self.addComponent(TiePowerSupply())
self["agility"] = math.radians(5)
self["color"] = (0, 255, 0)
示例5: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, *args, **kargs):
if not WoodShip.img:
WoodShip.img = pygame.image.load("../media/shitp.png").convert_alpha()
Ship.__init__(self, WoodShip.img, projectile = Harpoon, health = 40, *args, **kargs)
示例6: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, **kwargs):
Ship.__init__(self, **kwargs)
self["hits"] = 1000000
self["radius"] = 10
self["color"] = (0, 0, 255)
示例7: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, *args, **kargs):
if not MetalShip.img:
MetalShip.img = pygame.image.load("../media/shitp_metal.png").convert_alpha()
Ship.__init__(self, MetalShip.img, score = 35, projectile = Harpoon, health = 100, *args, **kargs)
示例8: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, win, x, y, width, height):
Ship.__init__(self, win, x, y, width, height)
self.place_alien_head(width / 2, height / 2)
示例9: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, melee):
Ship.__init__(self, melee)
示例10: __init__
# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
def __init__(self, startplanet, galaxy):
Ship.__init__(self, startplanet, galaxy)
self.speed = 3
self.color = 255, 0, 255 # Purple
self.maxdist = startplanet.maxdist + self.d6()
self.cargosize = 1E6 * self.d6()