summaryrefslogtreecommitdiff
path: root/Scripts/NumberNode.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/NumberNode.gd')
-rw-r--r--Scripts/NumberNode.gd9
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()