当前位置: 首页>>代码示例>>Python>>正文


Python Ship.__init__方法代码示例

本文整理汇总了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
开发者ID:craigmjohnston,项目名称:distributed-game-server,代码行数:9,代码来源:player.py

示例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
开发者ID:codelurker,项目名称:ygritte,代码行数:10,代码来源:player.py

示例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)
开发者ID:MobiusFreak,项目名称:WhaleGame,代码行数:10,代码来源:destructor.py

示例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)
开发者ID:dwagon,项目名称:SpaceBattle,代码行数:13,代码来源:tie_fighter.py

示例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)
开发者ID:MobiusFreak,项目名称:WhaleGame,代码行数:8,代码来源:woodship.py

示例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)
开发者ID:codelurker,项目名称:SpaceBattle,代码行数:7,代码来源:planetbase.py

示例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)
开发者ID:MobiusFreak,项目名称:WhaleGame,代码行数:7,代码来源:metalship.py

示例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)
开发者ID:TheRealest,项目名称:impulse,代码行数:6,代码来源:emptyship.py

示例9: __init__

# 需要导入模块: from ship import Ship [as 别名]
# 或者: from ship.Ship import __init__ [as 别名]
 def __init__(self, melee):
     Ship.__init__(self, melee)
开发者ID:greenm01,项目名称:openmelee,代码行数:4,代码来源:kzerZa.py

示例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()
开发者ID:dwagon,项目名称:Exodus,代码行数:8,代码来源:liner.py


注:本文中的ship.Ship.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。