end the tour when deleted

This commit is contained in:
Chr1Z93 2024-09-12 19:37:17 +02:00
parent bcce50caa4
commit b90951d8fe
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