Example #1
0
 def __init__(self, fondo, inicio):
     super().__init__()
     self.setupUi(self)
     self.setWindowTitle("Survival Game")
     self.fondo = fondo
     foto = QtGui.QPixmap(fondo)
     self.label.setPixmap(foto)
     self.label_2.resize(50, 50)
     foto2 = QtGui.QPixmap('personaje/p_arriba_q.png')
     self.imagen = 'personaje/p_arriba_q'
     self.label_2.setPixmap(foto2)
     barra = QtGui.QPixmap('black.png')
     mapa = []
     for i in range(600):
         mapa.append([''] * 800)
     self.mapa = mapa
     self.label_3.setPixmap(barra)
     self.posicion = [300, 200]
     self.puntero = [0, 0]
     self.angulo = 0
     self.label_2.move(300, 200)
     self.tipo = 'jugador'
     self.actualizar_mapa(300, 200, self)
     self.vida = 100
     self.balas = 20
     self.label_4.setText(str(self.balas))
     self.label_5.setText(str(self.vida))
     self.barra2 = self.progressBar_2
     self.tiempo = 0
     self.cronometro = main(self)
     self.cronometro.show()
     self.cronometro.Start()
     self.barra = self.progressBar
     self.setGeometry(300, 50, 800, 700)
     self.inicio = inicio
     self.paus = Pausa(self, self.inicio, self.cronometro)
     self.prox_supply = 0
     self.prox_supply_ocupado = False
     self.score = 0
     self.zombies_muertos = 0
     self.pushButton.clicked.connect(self.esc)