18 lines
613 B
Python
18 lines
613 B
Python
import pygame
|
|
import globals
|
|
from enums import BrickColor
|
|
|
|
class DropNext():
|
|
def __init__(self, width, height):
|
|
self.dropnext = pygame.Surface((width, height))
|
|
self.width = width
|
|
self.height = height
|
|
self.dropnext.fill((0, 0, 0)) # Fill with black
|
|
|
|
def draw(self, screen):
|
|
screen.blit(self.dropnext, (globals.TILE_SIZE * 15, globals.TILE_SIZE * 2))
|
|
|
|
def draw_block(self, brick):
|
|
self.dropnext.fill(BrickColor.Black.value)
|
|
self.dropnext.blit(brick, ((self.width - brick.get_width()) / 2, (self.height - brick.get_height()) / 2))
|
|
|