blob: 838befe114e83d694ced95217dae1b3b0c3d197c (
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
26
|
#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 *
#fuente = pygame.font.Font("./media/fuentes/space age.ttf", 25)
class Score():
def __init__(self, player):
self.player = player
self.font = pygame.font.Font("fonts/ice_sticks.ttf", 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)
|