blob: 58e239b287001a7277ccb0f4ccded384ae205ab9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#Actividad Esquiador
#Archivo: score.py
#Descripcion: Clase que maneja el puntaje del juego
#
import pygame
from pygame import *
from pygame.locals import *
from constants import *
from gettext import gettext as _
#fuente = pygame.font.Font("./media/fuentes/space age.ttf", 25)
class Score():
def __init__(self, player):
self.player = player
self.font = pygame.font.SysFont("Arial", 50)
pass
def draw(self, screen):
score = _("PUNTAJE: %05d") % self.player.score
surface = self.font.render(score, 1, (0,0,0))
rect = surface.get_rect()
screen.blit(surface, rect)
|