Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game1/score.py
blob: 7432612fcab8bfb42fe63dd78d8f618999debfe4 (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(None, 80)
    
    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)