From 596cd6f145e60c7e70327e0cd30fccd56c3f5039 Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Sun, 24 Nov 2024 03:50:55 +0200 Subject: [PATCH] really finished scoring --- _subsections/sec03/lesson-15.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/_subsections/sec03/lesson-15.org b/_subsections/sec03/lesson-15.org index 6ee8944..3e3775e 100644 --- a/_subsections/sec03/lesson-15.org +++ b/_subsections/sec03/lesson-15.org @@ -48,7 +48,7 @@ var _score: int **** in the game scene - Scene->Paddle->Node->Signals -- Area2D -> area_entered +- Area2D -> ~area_entered~ - set the register to the Game node @@ -74,3 +74,11 @@ var _score: int _score +=1 label.text = str(_score) #+END_SRC + +** remove the gem from the scene if it hits the padde +- the area2D node passed into the receiver method is a reference to the gem node +- so you can use the queue_free method to remove it from the scene queue + + #+BEGIN_SRC gdscript + area.queue_free() + #+END_SRC