Ejemplo n.º 1
0
    def turn(self, angle):
        amount = abs(angle) * turnConst

        if angle > 0:
            api.player_Action("turn-right", amount)
        else:
            api.player_Action("turn-left", amount)
Ejemplo n.º 2
0
    def turnTo(self, target):
        angle = self.GetAngleTo(target)
        amount = abs(angle) * turnConst

        if angle > 0:
            api.player_Action("turn-right", amount)
        else:
            api.player_Action("turn-left", amount)
Ejemplo n.º 3
0
 def move(self, target, ratio=0.5):
     distance = self.distance(target) * ratio
     if distance > distanceTolerance:
         api.player_Action("forward", int(distance * moveConst))
Ejemplo n.º 4
0
 def move_frame(self):
     api.player_Action("forward", 16)
Ejemplo n.º 5
0
 def strafe_frame(self, direction):
     if direction > 0:
         api.player_Action("strafe-right", 10)
     else:
         api.player_Action("strafe-left", 10)
Ejemplo n.º 6
0
    def turn_frame(self, turn):

        if turn > 0:
            api.player_Action("turn-right", 5)
        else:
            api.player_Action("turn-left", 5)
Ejemplo n.º 7
0
 def moveDistance(self, distance):
     api.player_Action("forward", int(distance * moveConst))
Ejemplo n.º 8
0
 def shoot(self, target):
     api.player_Action("shoot", 1)
     api.player_Action("shoot", 1)
     api.player_Action("shoot", 1)