本文整理匯總了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