本文整理汇总了Python中Command.Command.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Command.__init__方法的具体用法?Python Command.__init__怎么用?Python Command.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Command.Command
的用法示例。
在下文中一共展示了Command.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, base, nb_drop):
Command.__init__(self)
if plane is None or base is None:
raise "DropMilitarsCommand : Null reference"
self.planeSrc = plane
self.baseTarget = base
self.quantity = nb_drop
示例2: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, config):
Command.__init__(self, config)
if self.config.has_key('directory') and not os.path.isdir(self.config['directory']):
raise Exception("directory '%s' does not exists" % (self.config['directory'],))
if self.config.has_key('directory') and not os.listdir(self.config['directory']):
raise Exception("directory '%s' is empty" % (self.config['directory'],))
if not self.config.has_key('count'):
self.config['count'] = 1
示例3: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, mil_qty, fuel_qty, delete):
Command.__init__(self)
if plane is None:
raise "LoadRessourcesCommand : Null reference"
self.planeSrc = plane
self.militarQuantity = mil_qty
self.fuelQuantity = fuel_qty
self.delete_ressources = delete
示例4: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, config, **params):
Command.__init__(self, config, **params)
示例5: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self):
Command.__init__(self, Constants.SHUTDOWN_TAG)
示例6: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, main):
Command.__init__(self, main)
示例7: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self):
Command.__init__(self)
示例8: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, template):
Command.__init__(self)
self.eventTemplate = template
示例9: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, base):
Command.__init__(self)
if base is None or plane is None:
raise "LandCommand : null reference"
self.plane = plane
self.base = base
示例10: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, quantity_fuel):
Command.__init__(self)
if plane is None:
raise "FillFuelTankCommand : Null reference"
self.planeSrc = plane
self.quantity = quantity_fuel
示例11: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane):
Command.__init__(self)
if plane is None:
raise "WaitCommand : null reference"
self.plane = plane
示例12: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self):
Command.__init__(self, Constants.RESTART_TAG)
示例13: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self):
Command.__init__(self, Constants.NETWORK_INFO_TAG)
示例14: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, target):
Command.__init__(self)
if p is None or target is None:
raise Error("Attack Command : null reference")
self.planeSrc = plane
self.planeTarget = target
示例15: __init__
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import __init__ [as 别名]
def __init__(self, plane, coord):
Command.__init__(self)
if plane is None:
raise "MoveCommand : null reference"
self.plane = plane
self.destination = coord