So I have made a 2D platformer game in which currently I have almost 4 stages and in each level the player can increase his score by collecting diamonds. The score gets increased with every diamond he collects and he can see his score on the top left corner of screen. But I want to make sure that when the level ends the player gets a screen where he sees his total score of that level and then continue to next level because right now the score becomes 0 when player advances to next level and the process begins again.
I use this in the player script :
func _on_Area2D_body_entered(body: Node) -> void:
var scoretext="Score : "+String(score)
where I get scorelabel using this :
onready var scorelabel = get_parent().get_node("Score/ScoreDisplay")`