blob: 1c2580ba5de8fb6ce1170f65634ab6ea6c030599 (
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
|
#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)
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)
|