import pygame, Utils, math
from pygame.locals import *

class Bepo(pygame.sprite.Sprite):

    def __init__(self, place):
        pygame.sprite.Sprite.__init__(self)
        self.image = Utils.load_image('images/bepo.png', -1)
        self.rect = pygame.Rect(place, (99, 131))
        self.frame = 0
        self.xSpeed = -2
        self.ySpeed = 2

    def draw(self, screen):
        screen.blit(self.image, self.rect.topleft, (1, 1, 99, 131))

    def update(self, sprites, screen):
        self.frame += 1

        self.rect = self.rect.move(self.xSpeed, self.ySpeed)

        if self.frame == (60*60):
            sprites.remove(self)
        
