本文整理汇总了Python中Ship.stop方法的典型用法代码示例。如果您正苦于以下问题:Python Ship.stop方法的具体用法?Python Ship.stop怎么用?Python Ship.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ship
的用法示例。
在下文中一共展示了Ship.stop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import stop [as 别名]
def run():
print '--> mission Intercept The Sabateurs'
if not ship.enableDefense():
return False
if not drones.launchSmall():
return False
overview.seekAndDestory()
if not drones.back():
return False
ship.enableAfterburn()
if not overview.activateAccelerationGate():
return False
# pocket 1
# main enemies are 90km away
# approach for 85 secs
# mean while clean up nearby enemy
drones.launchSmall()
if not overview.switchTo('battle'):
return False
if not overview.lockEnemy(20):
return False
ship.fireOnce()
if not overview.lockTarget('transport', 1):
return False
ship.enableAfterburn()
ship.approachFor(85)
# wait for stop
begin = time.time()
while time.time() - begin < 20:
ship.stop()
key.pressEx(sc.Unlock)
mouse.moveToP(panel.center(panel.Drones))
mouse.wheel(-100)
while findAtDrones('fighting'):
time.sleep(10)
drones.back()
# use sentry to destory all the smalls
for i in range(6):
overview.lockTarget('s', 1)
drones.launchSentry()
begin = time.time()
while overview.lockTarget('s', 1) and time.time() - begin < 130:
ship.fireOnce()
drones.engage()
drones.back()
# do the rest
ship.fireOnce()
drones.launchSmall()
overview.seekAndDestory()
while not overview.pickCargo():
pass
drones.back()
print '<-- mission Intercept The Sabateurs\n'
return True