Ejemplo n.º 1
0
 def __init__(self, firing_pos, target_pos):
     self.init_pos = Vector2D.copy(firing_pos)
     self.pos = self.init_pos
     self.direction = Vector2D.normalise(target_pos - self.init_pos)
     self.velocity = 10
     self.radius = 5
     self.collision = None
     self.active = True
Ejemplo n.º 2
0
 def __init__(self, firing_pos, target_pos):
     self.init_pos = Vector2D.copy(firing_pos)
     self.pos = self.init_pos
     self.direction = Vector2D.normalise(target_pos - self.init_pos)
     self.velocity = 10
     self.radius = 5
     self.collision = None
     self.active = True
Ejemplo n.º 3
0
 def __init__(self, firing_pos, world=None, mode="Rifle"):
     self.init_pos = Vector2D.copy(firing_pos)
     self.world = world
     self.mode = mode
     self.bullet_speed = self.BULLET_VELOCITY[mode]
Ejemplo n.º 4
0
 def __init__(self, firing_pos, world=None, mode="Rifle"):
     self.init_pos = Vector2D.copy(firing_pos)
     self.world = world
     self.mode = mode
     self.bullet_speed = self.BULLET_VELOCITY[mode]
Ejemplo n.º 5
0
 def update_firing_pos(self, firing_pos):
     self.init_pos = Vector2D.copy(firing_pos)