def __init__(self, x, y, speed_x, speed_y, angle): super().__init__(x, y) self.speed = np.array([float(speed_x), float(speed_y)]) self.angle = angle self.image = LASER self.mask = pygame.mask.from_surface(rot_center( self.image, self.angle))
def get_mask(self): return pygame.mask.from_surface(rot_center(self.get_img(), self.angle))
def draw(self, window): if self.get_img() is None: return None window.blit(rot_center(self.get_img(), self.angle), self.pos)