From a0c5063fbc0f7f4f1205a58f764995243d800184 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 15 Apr 2024 06:48:35 +0700 Subject: sfx, tutorial, polish --- Scripts/NumberNode.gd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Scripts/NumberNode.gd') diff --git a/Scripts/NumberNode.gd b/Scripts/NumberNode.gd index b81481a..5fc4742 100644 --- a/Scripts/NumberNode.gd +++ b/Scripts/NumberNode.gd @@ -44,6 +44,8 @@ func _physics_process(_delta): shadow_sprite.scale = sprite.scale func join_from(node : NumberNode): + var prev_value = node.value + node.value += self.value var modifier_label = node.get_node_or_null("ModifierLabel") @@ -63,6 +65,13 @@ func join_from(node : NumberNode): node.target_pos = self.position node.update_visuals() + + if node.value >= prev_value: + print("YYY") + node.get_node("Score").playing = true + else: + print("NNOOOOOO") + node.get_node("Ouch").playing = true queue_free() -- cgit v1.2.3