示例#1
0
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)
示例#2
0
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)
示例#3
0
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)
示例#4
0
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)
示例#5
0
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)