alli
(usa Outra)
Enviado em 02/12/2020 - 00:00h
def main(self):
while True:
if self.mainScreen:
self.screen.blit(self.background, (0, 0))
self.titleText.draw(self.screen)
self.titleText2.draw(self.screen)
for e in event.get():
if self.should_exit(e):
sys.exit()
if e.type == KEYUP:
self.reset(0)
self.startGame = True
self.mainScreen = False
elif self.startGame:
if not self.enemies and not self.explosionsGroup:
currentTime = time.get_ticks()
if currentTime - self.gameTimer < 3000:
self.Ship(self.image = self.IMAGES['2']) #isso?
self.screen.blit(self.background, (0, 0))
self.scoreText2 = Text(FONT, 20, str(self.score),
GREEN, 305,47)
self.scoreText.draw(self.screen)
self.title.draw(self.screen)
self.scoreText2.draw(self.screen)
self.scoreText3.draw(self.screen2)
self.check_input()
self.reset(0)
if currentTime - self.gameTimer > 3000:
self.gameTimer += 3000
else:
currentTime = time.get_ticks()
self.screen.blit(self.background, (0, 0))
self.scoreText2 = Text(FONT, 20, str(self.score), GREEN,
425, 50)
self.scoreText.draw(self.screen)
self.title.draw(self.screen)
self.scoreText2.draw(self.screen)
self.check_input()
self.enemies.update(currentTime)
self.allSprites.update(self.keys, currentTime)
self.explosionsGroup.update(currentTime)
self.check_collisions()
display.update()
self.clock.tick(60)
eu tenho essa main. Coloco nela então? ai faço a diferença do tempo atual.. ai passo tipo Nave(ímagem[aqui qual iamgem quero trocar]) mas ou menos isso?