diff options
author | altaf-creator <dev@altafcreator.com> | 2024-04-15 06:48:35 +0700 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2024-04-15 06:48:35 +0700 |
commit | a0c5063fbc0f7f4f1205a58f764995243d800184 (patch) | |
tree | 595dd136155fb3fb2fee3b251b6dcbc91dbb3469 /Scripts/NumberNode.gd | |
parent | e730e2188eda08bf84fea7335dc2c0f3b5551509 (diff) |
sfx, tutorial, polish
Diffstat (limited to 'Scripts/NumberNode.gd')
-rw-r--r-- | Scripts/NumberNode.gd | 9 |
1 files changed, 9 insertions, 0 deletions
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() |