##Bullet Code
##In the VERY VERY VERY EXTREMELY far future, I would like BulletML for bullet code
##But I don't know how to use it ;_;
import pygame
from pygame.locals import *
from stg import *
from helpers import *
from typinggame import *
   
class BulletClass(pygame.sprite.Sprite): 
    def __init__(self, x,  y, angle=0):
        self.x = x
        self.y = y
        self.angle = angle
        self.speed = 50
        self.born = pygame.time.get_ticks()
        self.ttd = 5
        self.update()
    def update(self):
        self.image = load_image("Bullet.png")
        self.image.blit(self.image, (0,0))
        self.rect = self.image.get_rect()
        self.rect.center = (self.x, self.y)
        #Bullet calculations
        self.x += math.cos(self.angle) * self.speed
        self.y += math.sin(self.angle) * self.speed
        
###create bullets - This section is in the wrong place, belongs with boss class
##bulletclass = BulletClass(x, y, angle)
###Total amount of bullets
##totalBullets = 50
##for i in range(0, totalBullets):
##   bulletlist.append(bulletclass)
