def _fire_projectile(self): """Method to create projectiles in the projectiles group""" if len(self.projectiles) < self.settings.max_projectiles: new_projectile = Projectile(self) if self.projectile_direction == 'up': new_projectile.shooting_up = True elif self.projectile_direction == 'down': new_projectile.shooting_down = True elif self.projectile_direction == 'left': new_projectile.shooting_left = True elif self.projectile_direction == 'right': new_projectile.shooting_right = True self.projectiles.add(new_projectile)