-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimaciones.py
More file actions
40 lines (26 loc) · 731 Bytes
/
Copy pathAnimaciones.py
File metadata and controls
40 lines (26 loc) · 731 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
31
32
33
34
35
36
37
38
39
40
from Estructura_Personaje import *
# Ingresar movimiento
juego_1 = Jugador("Juego 2D - Animaciones", 50, 50)
juego_1.iniciar_libreria()
juego_1.poner_titulo()
juego_1.crear_ventana(400, 400)
run = True
while run:
# Rapidez del jugador
juego_1.rapidez(60)
juego_1.rellenar_color()
juego_1.calcular_movimiento()
juego_1.movimiento()
# Dibujar animacion
juego_1.obtener_img("Pinguino.png")
juego_1.longitud_img(0.5)
juego_1.movimiento_voltear()
juego_1.voltear_img()
# Cerrar ventana al presionar x
for evento in pygame.event.get():
if evento.type == pygame.QUIT:
run = False
juego_1.presionar_tecla(evento)
juego_1.despresionar_tecla(evento)
juego_1.actualizar_ventana()
juego_1.cerrar_ventana()