[Bug] Ensure only one layer of snow on the title (#6882)

You will no longer experience blizzards (and massive slowdowns)
due to many layers of the snow graphic on the main menu.
This commit is contained in:
Madmadness65 2025-12-21 15:01:03 -06:00 committed by GitHub
parent 1503a306cd
commit d9ddf6f24b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -261,6 +261,7 @@ export class TitleUiHandler extends OptionSelectUiHandler {
private getSnow(): void {
const width = globalScene.scaledCanvas.width;
const height = globalScene.scaledCanvas.height;
this.snow?.destroy(); // Ensures no duplicate snow layers
this.snow = globalScene.add.tileSprite(width, height, width, height, "snow");
this.snow.setOrigin(1, 1);