/
Juego.py
60 lines (42 loc) · 1.17 KB
/
Juego.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import pygame
import sys
from pygame.locals import *
from random import randint
from Products import *
import time
import Character
from Director import *
from Builder import *
from Character import *
import loadImages
class Juego():
i=0
width = 900
height = 600
colour = (227,166,162)
empezar = True
megaman = rightMegaman()
auxlist = megaman.get_sprites()
pygame.init()
posX=100
posY=250
posTup = (posX,posY)
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("Prueba")
speed=20
auxDirector = Director()
auxDirector.setBuilder(GokuBuilder())
charac= auxDirector.getChar()
charac.defPositions(posX,posY)
jugando =True
background = loadImages.load("background/mexBack.jpeg")
while empezar:
for i in pygame.event.get():
if i.type == QUIT:
pygame.quit()
empezar = False
sys.exit()
screen.blit(background,(0,0))
charac.update()
charac.drawCharacter(screen)
pygame.display.update()