Merge pull request #863 from argonui/tour

End the tour when deleted
This commit is contained in:
dscarpac 2024-09-12 19:04:04 -05:00 committed by GitHub
commit cb3289a04c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -106,6 +106,13 @@ do
end, 0.3)
end
-- Ends the tour for all players
function TourManager.stopTourForAll()
for playerColor, data in pairs(tourState) do
stopTour(Player[playerColor])
end
end
-- Updates the card UI for the script at the current index, moves the camera to the proper
-- position, and shows the card.
---@param playerColor string Player color to show the current card for

View File

@ -32,3 +32,7 @@ end
function deleteStarter(_, _, _)
self.destruct()
end
function onDestroy()
tourManager.stopTourForAll()
end