##############################################
#	Assignment 3 - Game Programming - HK181
#
#   Group 4:
#   Pham Quang Minh - 1512016
#   Nguyen Dinh Hao - 1510896
#   Vu Anh Tuan - 1513888
############################################

import pygame as pg
from Classes.Constants import COIN_DIR, BLACK

class Coin(pg.sprite.Sprite):
    def __init__(self, game, pos_x, pos_y):
        self.groups = game.all_sprites, game.coins
        pg.sprite.Sprite.__init__(self, self.groups)
        self.game = game

        self.current_frame = 0
        self.last_update = 0

        self.coin_list = [pg.image.load(COIN_DIR + "Coin_1.png")]

        self.image = self.coin_list[0]
        self.image.set_colorkey(BLACK)

        self.rect = self.image.get_rect()
        self.mask = pg.mask.from_surface(self.image) # Mask of coin
        self.rect.x = pos_x
        self.rect.y = pos_y

