def positionAsSupporter(player): """ Position to support teammate with claim. """ positionAsSupporter.position = getSupporterPosition(player, player.role) fastWalk = False if player.firstFrame(): player.brain.tracker.trackBall() player.brain.nav.goTo(positionAsSupporter.position, precision=nav.GENERAL_AREA, speed=nav.QUICK_SPEED, avoidObstacles=True, fast=fastWalk, pb=False) if positionAsSupporter.position.distTo(player.brain.loc) > 20: player.brain.nav.goTo(positionAsSupporter.position, precision=nav.GENERAL_AREA, speed=nav.QUICK_SPEED, avoidObstacles=True, fast=fastWalk, pb=False) player.brain.nav.updateDest(positionAsSupporter.position, fast=fastWalk)
def positionAsSupporter(player): if (role.isChaser(player.role) and role.isChaser(player.roleOfClaimer) and player.brain.ball.distance > hypot(CHASER_DISTANCE, CHASER_DISTANCE)): fast = True else: fast = False positionAsSupporter.position = getSupporterPosition(player, player.role) # TODO don't call goTo every frame player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = nav.QUICK_SPEED, avoidObstacles = True, fast = False, pb = False)
def positionAsSupporter(player): if (role.isChaser(player.role) and role.isChaser(player.roleOfClaimer) and player.brain.ball.distance > hypot(CHASER_DISTANCE, CHASER_DISTANCE)): fast = True else: fast = False positionAsSupporter.position = getSupporterPosition(player, player.role) if player.firstFrame(): player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = nav.QUICK_SPEED, avoidObstacles = True, fast = False, pb = False) player.brain.nav.updateDest(positionAsSupporter.position, fast=fast)
def positionAsSupporter(player): positionAsSupporter.position = getSupporterPosition(player, player.role) if player.firstFrame(): player.brain.tracker.trackBall() fastWalk = role.isChaser(player.role) player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = nav.QUICK_SPEED, avoidObstacles = True, fast = fastWalk, pb = False) if positionAsSupporter.position.distTo(player.brain.loc) > 20: player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = nav.QUICK_SPEED, avoidObstacles = True, fast = fastWalk, pb = False) player.brain.nav.updateDest(positionAsSupporter.position, fast = fastWalk)
def positionAsSupporter(player): """ Position to support teammate with claim. """ positionAsSupporter.position = getSupporterPosition(player, player.role) fastWalk = False playerFourSearchBehavior.pointIndex = -1 playerFiveSearchBehavior.pointIndex = -1 if player.firstFrame(): player.brain.tracker.trackBall() player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = speeds.SPEED_EIGHT, avoidObstacles = True, fast = fastWalk, pb = False) if positionAsSupporter.position.distTo(player.brain.loc) > 20: player.brain.nav.goTo(positionAsSupporter.position, precision = nav.GENERAL_AREA, speed = speeds.SPEED_EIGHT, avoidObstacles = True, fast = fastWalk, pb = False) player.brain.nav.updateDest(positionAsSupporter.position, fast = fastWalk)