Esempio n. 1
0
 def __init__(self, team_id, ammo_type=Rocket):
     ArenaObject.__init__(self)
     self.team_id = team_id
     self.remaining_reload_time = -1  # can fire at start of round
     self.type = ArenaObjectState.SENTRY
     self.ammo_type = ammo_type
     self.velocity = 0
Esempio n. 2
0
 def __init__(self, animation_type=ArenaObjectState.ANIMATION_EXPLOSION, parent_object=None):
     ArenaObject.__init__(self)
     self.animation_type = animation_type
     self.remaining_time = 5.0  # depending on type?
     self.type = animation_type
     self.parent_object_id = -1
     if parent_object:
         print type(parent_object)
         assert isinstance(parent_object, ArenaObject)
         self.parent_object_id = parent_object.id
Esempio n. 3
0
    def __init__(self, shooter=None):
        ArenaObject.__init__(self)
        # assert isinstance(shooter, PlayerRobot)

        sender_id = -1
        team_id = -1
        if isinstance(shooter, PlayerRobot):
            sender_id = shooter.player_id
            team_id = shooter.team_id
            self.copy_pose_from(shooter)

        self._create(shooter_id=sender_id, team_id=team_id)
        self.velocity = 0.3
Esempio n. 4
0
    def __init__(self, player_id, team_id, name):
        ArenaObject.__init__(self, name=name)
        assert isinstance(team_id, int)
        self.robot_interface = RoboterInterface(name=name)

        self.player_id = player_id
        self.team_id = team_id

        self.hp = PlayerRobot.max_hp
        self.shield = PlayerRobot.max_shield
        self.score = 0
        self.max_velocity = 1
        self.player_color = (255, 0, 0) if player_id == 1 else (0, 255, 0)
        self.type = ArenaObjectState.PLAYER
        start_new_thread(self._send_state_thread, ())

        self.weapon_count = dict()
        self.weapon_count[ArenaObjectState.ROCKET] = 0
        self.weapon_count[ArenaObjectState.BANANA] = 0
        self.weapon_count[ArenaObjectState.MINE] = 0
Esempio n. 5
0
 def __init__(self):
     ArenaObject.__init__(self)
     self.recharge_time = 20
     self.activation_distance = 0.1
     self.remaining_recharge_time = -1
     self.type = -1
Esempio n. 6
0
 def __init__(self, value):
     ArenaObject.__init__(self)
     self.value = value
     self.type = ArenaObjectState.TOKEN_COLLECTIBLE_TREASURE
Esempio n. 7
0
 def __init__(self, value):
     ArenaObject.__init__(self)
     self.value = value
Esempio n. 8
0
 def __init__(self, team_id):
     ArenaObject.__init__(self)
     self.team_id = team_id
     self.remaining_recharge_time = -1