Should i do remove (key) for GameScene?

Hey! please tell me if I want to start restarting GameScene from StartScene using this.scene.start (key) - will this mean that I am creating a new GameScene object or so I will start the old scene object with new parameters? should i do remove (key) for GameScene? if so, how? by doing remove (key) and then running start (key) I get a black screen. here is my code in StartScene:

restartGame() {
        this.input.on('pointerdown', () => {
            this.scene.start('Game', {
                    score: ONE_TIME.score,
                    hearts: ONE_TIME.hearts,
                    level: ONE_TIME.level,
                    max_score: ONE_TIME.max_score
                }) 
        })
    }

It will start the same scene object with new parameters. You shouldn’t have to remove.

1 Like