Esempio n. 1
0
def copy_player(player, builder):
    TinyPlayer.TinyPlayerStart(builder)
    TinyPlayer.TinyPlayerAddLocation(builder, copy_v3(player.Physics().Location(), builder))
    TinyPlayer.TinyPlayerAddVelocity(builder, copy_v3(player.Physics().Velocity(), builder))
    TinyPlayer.TinyPlayerAddRotation(builder, copy_rot(player.Physics().Rotation(), builder))
    TinyPlayer.TinyPlayerAddTeam(builder, player.Team())
    return TinyPlayer.TinyPlayerEnd(builder)
Esempio n. 2
0
 def copy_player(self, player, builder):
     TinyPlayer.TinyPlayerStart(builder)
     TinyPlayer.TinyPlayerAddLocation(
         builder, self.copy_v3(player.physics.location, builder))
     TinyPlayer.TinyPlayerAddVelocity(
         builder, self.copy_v3(player.physics.velocity, builder))
     TinyPlayer.TinyPlayerAddRotation(
         builder, self.copy_rot(player.physics.rotation, builder))
     TinyPlayer.TinyPlayerAddTeam(
         builder,
         invert_team(player.team)
         if self.should_flip_field else player.team)
     TinyPlayer.TinyPlayerAddBoost(builder, player.boost)
     return TinyPlayer.TinyPlayerEnd(builder)
Esempio n. 3
0
 def copy_player(self, player, builder):
     TinyPlayer.TinyPlayerStart(builder)
     TinyPlayer.TinyPlayerAddLocation(
         builder, self.copy_v3(player.Physics().Location(), builder))
     TinyPlayer.TinyPlayerAddVelocity(
         builder, self.copy_v3(player.Physics().Velocity(), builder))
     TinyPlayer.TinyPlayerAddRotation(
         builder, self.copy_rot(player.Physics().Rotation(), builder))
     TinyPlayer.TinyPlayerAddTeam(
         builder,
         invert_team(player.Team())
         if self.should_flip_field else player.Team())
     TinyPlayer.TinyPlayerAddBoost(builder, player.Boost())
     return TinyPlayer.TinyPlayerEnd(builder)