Added name in corner
This commit is contained in:
2
game.py
2
game.py
@ -73,6 +73,7 @@ class Game(gameUtils.Game):
|
||||
|
||||
self.gunScale = min(self.size[1]/self.gunh,self.size[0]/self.gunw) #calculates how to scale the gun so that it stays on the screen
|
||||
|
||||
self.font = pygame.font.SysFont('', 64)
|
||||
|
||||
#Selects random music to play at the start of the game, might change because I just threw this together.
|
||||
#I feel horrible writing this code this feels super unoptimised :c
|
||||
@ -156,6 +157,7 @@ class Game(gameUtils.Game):
|
||||
#screen code
|
||||
self.surf.fill("black")
|
||||
self.surf.blit(gameUtils.centre(pygame.transform.scale_by(self.gun.getFrame(), self.gunScale), self.size))
|
||||
self.surf.blit(self.font.render(f'Current player: {self.currentlyPlaying.name}', True, (255, 255, 255)), (0, 0))
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user