-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremios.py
More file actions
30 lines (24 loc) · 782 Bytes
/
Copy pathpremios.py
File metadata and controls
30 lines (24 loc) · 782 Bytes
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
27
28
29
30
import pygame
class Premio:
def __init__(self, x, y):
self.x = x
self.y = y
self.ancho = 20
self.alto = 20
self.velocidad = 6
self.tipo = 1
self.color = 'yellow'
self.imagen = pygame.image.load('assets/estrella.png')
self.forma = pygame.Rect(self.x, self.y, self.ancho, self.alto)
def dibujar(self, ventana):
self.forma = pygame.Rect(self.x, self.y, self.ancho, self.alto)
# Este es un placeholder de los premios
# pygame.draw.rect(ventana, self.color, self.forma)
ventana.blit(self.imagen, self.forma)
def movimiento(self):
self.y += self.velocidad
'''class Bonus(Premio):
def __init__(self):
self.tipo = 2
self.color = 'green'
'''