improvement: use the cbs functions to unload cbs
This commit is contained in:
parent
c8204f044f
commit
0cd282027c
2 changed files with 7 additions and 4 deletions
|
@ -56,11 +56,15 @@ end
|
|||
|
||||
function BattleSystem:timerResponse(name)
|
||||
if (name == "flee") then
|
||||
--placeholder, pour l'instant on retourne juste au menu
|
||||
scenes.debug.menu()
|
||||
self:returnToOverworld(true)
|
||||
end
|
||||
end
|
||||
|
||||
function BattleSystem:returnToOverworld(isFleeing)
|
||||
self.assets:silence()
|
||||
game.cbs:endBattle(isFleeing)
|
||||
end
|
||||
|
||||
function BattleSystem:looseBattle()
|
||||
self.screen = GameOverScreen(self)
|
||||
end
|
||||
|
|
|
@ -114,8 +114,7 @@ function VictoryScreen:update(dt)
|
|||
if (self:allCharDone()) then
|
||||
local keys = self.scene:getKeys(1)
|
||||
if (keys["A"].isPressed) then
|
||||
--placeholder, pour l'instant on retourne juste au menu
|
||||
scenes.debug.menu()
|
||||
self.scene:returnToOverworld(false)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue