Change the way the mobs are cleared from screen #1164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was created because of #10655
I think it makes more sense to free the mobs when it's game over so it's more visual to the person who is learning.
At this point in the tutorial when we die we have a ~2 second window to be able to start the game again. In this time all the mobs on the screen are not visible anymore, so the
queue_free
action is not too obvious.It feels better to be able to see what this line of code is doing by removing them immediately when it's game over, this way we can visually see what the code is doing.
Before:
![2143d44000dd690a8406b1ac9b6fa0ce](https://private-user-images.githubusercontent.com/17441426/411361096-16eb58fd-c1d0-4171-8c8b-7282507c5f6c.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Mjg0NDcsIm5iZiI6MTczOTYyODE0NywicGF0aCI6Ii8xNzQ0MTQyNi80MTEzNjEwOTYtMTZlYjU4ZmQtYzFkMC00MTcxLThjOGItNzI4MjUwN2M1ZjZjLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0MDIyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiNDhmZThmMjAzNTQwZDMyNmNjOGU4YjcyNDY1YmI0MGJhMTI4YmQyZWYzNDA0Y2U1YWM0NDM2YjVhNjY2MzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.S9_g-vCat_g56Vvo854Iu8cSWh6T8wpIZjdBQ0A3l9I)
After:
![69b004679a44531ae3bd28995287506b](https://private-user-images.githubusercontent.com/17441426/411361107-8cdb7754-9bca-4157-964f-cd51dcd34e90.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Mjg0NDcsIm5iZiI6MTczOTYyODE0NywicGF0aCI6Ii8xNzQ0MTQyNi80MTEzNjExMDctOGNkYjc3NTQtOWJjYS00MTU3LTk2NGYtY2Q1MWRjZDM0ZTkwLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0MDIyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY1Yzc4YjdkMjg0NWNmYjViNGQzMzJlZjBjODcxZTNlMjhmYjliMTdlOTYwNjUzYTdkZmY1MzQ4MjcyOWJhYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lBMLmdMx6XPeqzlWaKpjA4iO2X0VSIsCEV6uilep0Xs)