def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() self.tilemap = Loader("MAPS/campo_000.tmx", self.wall) self.surface = pygame.Surface( ((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6, 5)) if (startPos != None): self.player = Player( self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(1152, -384), self.tilemap, 1) self.enemyCreated = False self.enemyPatrol = 0 self.enemy2Patrol = 0 self.player.canInteract = True self.player.useDepth = True self.camera = PlayerFollow(self.player.cartesianPos) self.dialogue = Dialogue() self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.createdSunan = False self.sunanCutscene = 0
def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() self.tilemap = Loader("MAPS/academia_000.tmx", self.wall) self.surface = pygame.Surface(((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6,5)) if(startPos != None): self.player = Player(self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(512,-768), self.tilemap, 1) self.player.canInteract = False self.player.useDepth = False self.dialogue = Dialogue() #self.fade(1920, 1080) ##CUTSCENES self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.fourthDialogue = False self.fifthDialogue = False self.sixthDialogue = False self.seventhDialogue = False self.kamon = Kamon(self.wall, pygame.Vector2(512, -640), self.tilemap, 0) self.camera = PlayerFollow(self.player.cartesianPos)
class Field(SceneModel): def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() self.tilemap = Loader("MAPS/campo_000.tmx", self.wall) self.surface = pygame.Surface( ((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6, 5)) if (startPos != None): self.player = Player( self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(1152, -384), self.tilemap, 1) self.enemyCreated = False self.enemyPatrol = 0 self.enemy2Patrol = 0 self.player.canInteract = True self.player.useDepth = True self.camera = PlayerFollow(self.player.cartesianPos) self.dialogue = Dialogue() self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.createdSunan = False self.sunanCutscene = 0 def ProcessInput(self, event, pressed_keys): self.isoPos = self.tilemap.cartesianToIsometric( pygame.Vector2(pygame.mouse.get_pos()[0] - self.camera.x, -self.camera.y + pygame.mouse.get_pos()[1] - 128)) self.player.ProcessInputs(self.isoPos) if (self.firstDialogue == True & (len(self.dialogue.text) < len(self.dialogue.completeText))): if event.type == pygame.MOUSEBUTTONDOWN: self.dialogue.text = self.dialogue.completeText elif (len(self.dialogue.text) == len(self.dialogue.completeText)): if event.type == pygame.MOUSEBUTTONDOWN: if (self.secondDialogue == False): self.dialogue.setCharName("Soldados") self.dialogue.setText("Parado !!") self.secondDialogue = True if (self.sunanCutscene == 3): self.dialogue.visible = False self.player.canInteract = True def Update(self): self.surface.fill((0, 0, 0)) self.tilemap.DrawGround(self.surface, self.camera) pygame.display.update(self.tilemap.groundSprite) if (self.enemyCreated == True): self.enemy.Update(self.surface) self.enemy2.Update(self.surface) self.camera.getPlayerPosition(self.player.isoMov) self.player.Update(self.camera, self.surface) self.wall.draw(self.surface, self.player) if (self.player.isoReal.x == 3 and (self.player.isoReal.y == 7 or self.player.isoReal.y == 8)): self.player.canInteract = False if (self.enemyCreated == False): self.enemy = NPC(self.wall, pygame.Vector2(0, -896), self.tilemap, 1) self.enemy2 = NPC(self.wall, pygame.Vector2(0, -1024), self.tilemap, 1) self.enemyCreated = True if (self.enemyCreated == True): if (self.enemyPatrol == 0): self.enemy.goToPosition(pygame.Vector2(128, -896)) if (self.enemy.moving == False and int(self.enemy.isoReal.x) >= 126): self.enemyPatrol = 1 if (self.enemy2Patrol == 0): self.enemy2.goToPosition(pygame.Vector2(128, -1024)) if (self.enemy2.moving == False and int(self.enemy2.isoReal.x) >= 126): self.enemy2Patrol = 1 if (self.enemyPatrol == 1 and self.enemy2Patrol == 1): if (self.firstDialogue == False): self.dialogue.setCharName("Soldados") self.dialogue.setText("Encontramos você !!") self.dialogue.visible = True self.firstDialogue = True if (len(self.dialogue.text) < len(self.dialogue.completeText)): self.dialogue.updateText() if (self.secondDialogue == True and self.thirdDialogue == False and self.createdSunan == False): self.Sunan = Sunan(self.wall, pygame.Vector2(1152, -1024), self.tilemap, 1) self.createdSunan = True if (self.createdSunan == True): self.Sunan.Update(self.surface) if (self.sunanCutscene == 0): self.Sunan.goToPosition(pygame.Vector2(256, -1024)) elif (self.sunanCutscene == 1): self.Sunan.voadoraAct = True self.enemy2.die = True if (self.Sunan.finishedVoadora == True): self.sunanCutscene = 2 elif (self.sunanCutscene == 2): self.Sunan.kickAct = True if (self.Sunan.finishedKick == True): self.sunanCutscene = 3 self.dialogue.setCharName("???") self.dialogue.setText("Corre") self.dialogue.visible = True if (self.sunanCutscene == 2 or self.sunanCutscene == 3): if (self.enemy2.die == False): self.enemy.die = True if (self.Sunan.moving == False and int(self.Sunan.isoReal.x) <= 300 and self.sunanCutscene == 0): self.sunanCutscene = 1 if (self.player.isoReal.x == 4 and self.player.isoReal.y == 9): self.SwitchToScene(self.sceneManager.scenesArray[5], pygame.Vector2(4, 0)) self.Destroy() pygame.display.flip() def Render(self): self.window.display.blit(self.surface, (self.camera.x, self.camera.y)) if (self.enemyPatrol == 1 and self.enemy2Patrol == 1): self.dialogue.Draw(self.window.display) pygame.display.update(self.window.display.get_rect()) def Destroy(self): self.surface.fill((0, 0, 0, 0))
class Field2(SceneModel): def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() self.tilemap = Loader("MAPS/campo2.tmx", self.wall) self.surface = pygame.Surface( ((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6, 5)) if (startPos != None): self.player = Player( self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(512, -768), self.tilemap, 1) self.player.canInteract = True self.player.useDepth = True self.camera = PlayerFollow(self.player.cartesianPos) self.dialogue = Dialogue() self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.fourthDialogue = False self.createdSunan = False self.startDialog = False pygame.display.flip() def ProcessInput(self, event, pressed_keys): self.isoPos = self.tilemap.cartesianToIsometric( pygame.Vector2(pygame.mouse.get_pos()[0] - self.camera.x, -self.camera.y + pygame.mouse.get_pos()[1] - 128)) self.player.ProcessInputs(self.isoPos) if (self.firstDialogue == True & (len(self.dialogue.text) < len(self.dialogue.completeText))): if event.type == pygame.MOUSEBUTTONDOWN: self.dialogue.text = self.dialogue.completeText elif (len(self.dialogue.text) == len(self.dialogue.completeText)): if event.type == pygame.MOUSEBUTTONDOWN: if (self.secondDialogue == False): self.dialogue.setCharName("Sunan") self.dialogue.setText("Me chamo Sunan...") self.secondDialogue = True elif (self.thirdDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText( "Sunan!? Meu irmão pediu para te procurar. Antes de morrer...\n Ele disse que você pode trazer paz para o nosso povo" ) self.thirdDialogue = True elif (self.fourthDialogue == False): self.dialogue.setCharName("Sunan") self.dialogue.setText( "Voltei para treinar uma elite de guerreiros, pessoas que tem coragem\nsuficiente para expulsar os invasores" ) self.thirdDialogue = True def Update(self): self.surface.fill((0, 0, 0)) self.tilemap.DrawGround(self.surface, self.camera) pygame.display.update(self.tilemap.groundSprite) self.camera.getPlayerPosition(self.player.isoMov) self.player.Update(self.camera, self.surface) self.wall.draw(self.surface, self.player) if (len(self.dialogue.text) < len(self.dialogue.completeText)): self.dialogue.updateText() if (self.createdSunan == True): self.Sunan.Update(self.surface) if (self.player.isoReal.x == 4 and self.player.isoReal.y == 3): self.player.canInteract = False if (self.createdSunan == False): self.Sunan = Sunan(self.wall, pygame.Vector2(512, 0), self.tilemap, 1) self.createdSunan = True if (self.startDialog == False and self.createdSunan == True): self.Sunan.goToPosition(pygame.Vector2(512, -256)) if (self.Sunan.moving == False and int(self.Sunan.isoReal.y) > -258): self.player.lastDir = 1 self.startDialog = True if (self.startDialog == True and self.firstDialogue == False): self.dialogue.setCharName("???") self.dialogue.setText("Agora nós estamos seguros") self.firstDialogue = True def Render(self): self.window.display.blit(self.surface, (self.camera.x, self.camera.y)) if (self.startDialog == True): self.dialogue.Draw(self.window.display) pygame.display.update(self.window.display.get_rect()) def Destroy(self): self.surface.fill((0, 0, 0, 0))
def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() music.play() self.tilemap = Loader("MAPS/academia_001.tmx", self.wall) self.surface = pygame.Surface( ((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6, 5)) if (startPos != None): self.player = Player( self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(512, -768), self.tilemap, 1) self.player.canInteract = False self.player.useDepth = False self.player.standUp = True self.dialogue = Dialogue() #self.fade(1920, 1080) ##CUTSCENES self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.fourthDialogue = False self.fifthDialogue = False self.sixthDialogue = False self.seventhDialogue = False self.cameraDragToEnemies = False self.createdEnemies = False self.reopenDialog = False self.soldiersResponse = False self.soldiersWalk = True self.firstBlock = True self.secondBlock = False self.enemy2Patrol = 0 self.enemy3Patrol = 0 self.nextLevel = False self.kamon = Kamon(self.wall, pygame.Vector2(512, -640), self.tilemap, 1) self.camera = PlayerFollow(self.player.cartesianPos) self.camera.followPlayer = True
class Ruins(SceneModel): def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() music.play() self.tilemap = Loader("MAPS/academia_001.tmx", self.wall) self.surface = pygame.Surface( ((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6, 5)) if (startPos != None): self.player = Player( self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(512, -768), self.tilemap, 1) self.player.canInteract = False self.player.useDepth = False self.player.standUp = True self.dialogue = Dialogue() #self.fade(1920, 1080) ##CUTSCENES self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.fourthDialogue = False self.fifthDialogue = False self.sixthDialogue = False self.seventhDialogue = False self.cameraDragToEnemies = False self.createdEnemies = False self.reopenDialog = False self.soldiersResponse = False self.soldiersWalk = True self.firstBlock = True self.secondBlock = False self.enemy2Patrol = 0 self.enemy3Patrol = 0 self.nextLevel = False self.kamon = Kamon(self.wall, pygame.Vector2(512, -640), self.tilemap, 1) self.camera = PlayerFollow(self.player.cartesianPos) self.camera.followPlayer = True def explosion(self, width, height): surface = pygame.Surface((width, height)) surface.fill((0, 0, 0)) for i in range(0, 3): pygame.time.delay(300) surface.fill((0, 0, 0)) pygame.display.update() self.window.display.blit(surface, (0, 0)) pygame.display.update() surface.fill((255, 255, 255)) pygame.time.delay(300) pygame.display.update() self.window.display.blit(surface, (0, 0)) pygame.display.update() def ProcessInput(self, event, pressed_keys): self.isoPos = self.tilemap.cartesianToIsometric( pygame.Vector2(pygame.mouse.get_pos()[0] - self.camera.x, -self.camera.y + pygame.mouse.get_pos()[1] - 128)) self.player.ProcessInputs(self.isoPos) if (self.firstDialogue == True & (len(self.dialogue.text) < len(self.dialogue.completeText))): if event.type == pygame.MOUSEBUTTONDOWN: self.dialogue.text = self.dialogue.completeText elif (len(self.dialogue.text) == len(self.dialogue.completeText)): if event.type == pygame.MOUSEBUTTONDOWN: if (self.firstBlock == True): if (self.secondDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText("Ahh!...") self.secondDialogue = True elif (self.thirdDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText( "Irmão, não me deixe! Eu preciso de você, a vila precisa de você..." ) self.thirdDialogue = True elif (self.fourthDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText( "Boran, meu fim está próximo mas o seu está longe...\n Preciso que você vá para a Floresta dos Ventos e\n procure por Sunan..." ) self.fourthDialogue = True elif (self.fifthDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Sunan?") self.fifthDialogue = True elif (self.sixthDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText( "... E nunca lute com nenhum deles, ainda não estamos preparados..." ) self.sixthDialogue = True elif (self.seventhDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Irmão??") self.seventhDialogue = True else: self.dialogue.visible = False self.cameraDragToEnemies = True self.firstBlock = False elif (self.secondBlock == True): if (self.soldiersResponse == False): self.dialogue.setCharName("Soldados") self.dialogue.setText("Sim Senhor!") self.soldiersResponse = True else: self.player.canInteract = True self.player.useDepth = True self.camera.followPlayer = True self.dialogue.visible = False self.cameraDragToEnemies = False self.secondBlock = False else: self.soldiersWalk = True def Update(self): if (self.nextLevel == False): self.surface.fill((0, 0, 0)) self.tilemap.DrawGround(self.surface, self.camera) pygame.display.update(self.tilemap.groundSprite) self.camera.getPlayerPosition(self.player.isoMov) self.player.Update(self.camera, self.surface) self.kamon.Update(self.surface) self.wall.draw(self.surface, self.player) if (self.firstDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Irmão!?") self.firstDialogue = True if (len(self.dialogue.text) < len(self.dialogue.completeText)): self.dialogue.updateText() if (self.seventhDialogue == True & self.cameraDragToEnemies == True): self.camera.followPlayer = False self.camera.goToPosition(pygame.Vector2(-1200, 0), False) if (self.camera.getPositionX() == -1200): if (self.createdEnemies == False): self.enemy2 = NPC(self.wall, pygame.Vector2(896, -1152), self.tilemap, 1) self.enemy = NPC(self.wall, pygame.Vector2(1024, -1152), self.tilemap, 1) self.enemy3 = NPC(self.wall, pygame.Vector2(1152, -1152), self.tilemap, 1) self.createdEnemies = True if (self.createdEnemies == True): self.enemy.Update(self.surface) self.enemy2.Update(self.surface) self.enemy3.Update(self.surface) if (self.reopenDialog == False): self.enemy.goToPosition(pygame.Vector2(1024, -1024)) if (int(self.enemy.isoReal.y) == -1024): self.secondBlock = True self.dialogue.visible = True self.dialogue.setCharName("Tenente") self.dialogue.setText("Eliminem os sobreviventes") self.reopenDialog = True if (self.soldiersResponse == True & self.reopenDialog == True & self.soldiersWalk == True): if (self.enemy2Patrol == 0): self.enemy2.goToPosition(pygame.Vector2(128, -1180)) elif (self.enemy2Patrol == 1): self.enemy2.goToPosition(pygame.Vector2(896, -1180)) if (self.enemy2.moving == False and int(self.enemy2.isoReal.x) == 896): self.enemy2Patrol = 0 elif (self.enemy2.moving == False and int(self.enemy2.isoReal.x) < 180): self.enemy2Patrol = 1 if (self.enemy3Patrol == 0): self.enemy3.goToPosition(pygame.Vector2(1152, 0)) elif (self.enemy3Patrol == 1): self.enemy3.goToPosition(pygame.Vector2(1152, -1152)) if (self.enemy3.moving == False and int(self.enemy3.isoReal.y) == -1152): self.enemy3Patrol = 0 elif (self.enemy2.moving == False and int(self.enemy3.isoReal.y) < 2): self.enemy3Patrol = 1 if (self.player.isoReal.x == 0): self.nextLevel = True self.SwitchToScene(self.sceneManager.scenesArray[3], None) self.Destroy() pygame.display.flip() def Render(self): if (self.nextLevel == False): self.window.display.blit(self.surface, (self.camera.x, self.camera.y)) self.dialogue.Draw(self.window.display) pygame.display.update(self.window.display.get_rect()) def Destroy(self): self.surface.fill((0, 0, 0, 0))
class Academy(SceneModel): def Start(self, _gameWindow, sceneManager, startPos): self.window = _gameWindow self.sceneManager = sceneManager self.wall = YAwareGroup() self.tilemap = Loader("MAPS/academia_000.tmx", self.wall) self.surface = pygame.Surface(((self.tilemap.mapSize.x * self.tilemap.tileSize.x) + 32, self.tilemap.mapSize.y * self.tilemap.tileSize.y + (self.tilemap.tileSize.y * 2)), pygame.HWSURFACE) self.surface.get_rect().centerx = (self.tilemap.tileSize.x * self.tilemap.mapSize.x) / 2 self.surface.get_rect().centery = (self.tilemap.tileSize.y * self.tilemap.mapSize.y) / 2 self.tilemap.Generate(self.surface, pygame.Vector2(-6,5)) if(startPos != None): self.player = Player(self.wall, pygame.Vector2(startPos.x * 128, -startPos.y * 128), self.tilemap, 1) else: self.player = Player(self.wall, pygame.Vector2(512,-768), self.tilemap, 1) self.player.canInteract = False self.player.useDepth = False self.dialogue = Dialogue() #self.fade(1920, 1080) ##CUTSCENES self.firstDialogue = False self.secondDialogue = False self.thirdDialogue = False self.fourthDialogue = False self.fifthDialogue = False self.sixthDialogue = False self.seventhDialogue = False self.kamon = Kamon(self.wall, pygame.Vector2(512, -640), self.tilemap, 0) self.camera = PlayerFollow(self.player.cartesianPos) def explosion(self, width, height): surface = pygame.Surface((width, height)) explosion.play() surface.fill((0,0,0)) for i in range(0, 3): pygame.time.delay(300) surface.fill((0,0,0)) pygame.display.update() self.window.display.blit(surface, (0,0)) pygame.display.update() surface.fill((255,255,255)) pygame.time.delay(300) pygame.display.update() self.window.display.blit(surface, (0,0)) pygame.display.update() def ProcessInput(self, event, pressed_keys): self.isoPos = self.tilemap.cartesianToIsometric(pygame.Vector2(pygame.mouse.get_pos()[0] - self.camera.x, - self.camera.y + pygame.mouse.get_pos()[1] - 128)) self.player.ProcessInputs(self.isoPos) if(self.firstDialogue == True & (len(self.dialogue.text) < len(self.dialogue.completeText))): if event.type == pygame.MOUSEBUTTONDOWN: self.dialogue.text = self.dialogue.completeText elif(len(self.dialogue.text) == len(self.dialogue.completeText)): if event.type == pygame.MOUSEBUTTONDOWN: if(self.secondDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Espero me tornar um grande guerreiro igual você! Quando os \nmonges te levarão para receber o treinamento para ser um mestre?") self.secondDialogue = True elif(self.thirdDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText("Quando eu estiver preparado... Os monges estão se isolando na \nfloresta dos Ventos... Acredito que isso tem alguma ligação com as \nnotícias recentes...") self.thirdDialogue = True elif(self.fourthDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Notícias?") self.fourthDialogue = True elif(self.fifthDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText("Sim, sobre o terrível Harrison \"The Hunter\" e seu império Apolda. \nDiversos povos já foram escravizados ou dizimados.") self.fifthDialogue = True elif(self.sixthDialogue == False): self.dialogue.setCharName("Boran") self.dialogue.setText("Temos fortes guerreiros, todos nós somos muito bem treinados!") self.sixthDialogue = True elif(self.seventhDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText("Meu jovem irmão, pelos boatos que ouvi, um dos maiores mestres \nde Muay Thai caiu diante de um jovem mago Apolda... Os nossos \nmelhores guerreiros são ineficazes sem o equilíbrio da natureza...") self.seventhDialogue = True else: self.SwitchToScene(self.sceneManager.scenesArray[2], None) self.dialogue.visible = False self.explosion(1920, 1080) #self.player.canInteract = True def Update(self): self.surface.fill((0,0,0)) self.tilemap.DrawGround(self.surface, self.camera) pygame.display.update(self.tilemap.groundSprite) self.camera.getPlayerPosition(self.player.isoMov) self.player.Update(self.camera, self.surface) self.kamon.Update(self.surface) self.wall.draw(self.surface, self.player) if(self.firstDialogue == False): self.dialogue.setCharName("Kamon") self.dialogue.setText("Fico muito feliz pelo seu aprendizado, meu irmão. Um dia você se \ntornará um grande homem!") self.firstDialogue = True if(len(self.dialogue.text) < len(self.dialogue.completeText)): self.dialogue.updateText() #if(self.player.isoReal.x == 3 and self.player.isoReal.y == 7): # self.SwitchToScene(self.sceneManager.scenesArray[2]) # self.Destroy() # pygame.display.flip() def Render(self): self.window.display.blit(self.surface,(self.camera.x, self.camera.y)) self.dialogue.Draw(self.window.display) pygame.display.update(self.window.display.get_rect()) def Destroy(self): self.surface.fill((0,0,0,0))