improvement: use the cbs functions to unload cbs

This commit is contained in:
Kazhnuz 2021-04-02 22:25:26 +02:00
parent c8204f044f
commit 0cd282027c
2 changed files with 7 additions and 4 deletions

View file

@ -56,11 +56,15 @@ end
function BattleSystem:timerResponse(name) function BattleSystem:timerResponse(name)
if (name == "flee") then if (name == "flee") then
--placeholder, pour l'instant on retourne juste au menu self:returnToOverworld(true)
scenes.debug.menu()
end end
end end
function BattleSystem:returnToOverworld(isFleeing)
self.assets:silence()
game.cbs:endBattle(isFleeing)
end
function BattleSystem:looseBattle() function BattleSystem:looseBattle()
self.screen = GameOverScreen(self) self.screen = GameOverScreen(self)
end end

View file

@ -114,8 +114,7 @@ function VictoryScreen:update(dt)
if (self:allCharDone()) then if (self:allCharDone()) then
local keys = self.scene:getKeys(1) local keys = self.scene:getKeys(1)
if (keys["A"].isPressed) then if (keys["A"].isPressed) then
--placeholder, pour l'instant on retourne juste au menu self.scene:returnToOverworld(false)
scenes.debug.menu()
end end
end end