summaryrefslogtreecommitdiff
path: root/scenes/score_window/score_window.gd
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-17 11:41:57 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-17 11:41:57 -0600
commita969c365be7ac251ff8717d59860739f7b7c7610 (patch)
tree7684b6eff7acb3a2984ebff61fbe4efb855575a5 /scenes/score_window/score_window.gd
parent1bba8f26cbd58d9bd853cc12662bd4df35c3c150 (diff)
Integrate game over screen oh god
Diffstat (limited to 'scenes/score_window/score_window.gd')
-rw-r--r--scenes/score_window/score_window.gd7
1 files changed, 6 insertions, 1 deletions
diff --git a/scenes/score_window/score_window.gd b/scenes/score_window/score_window.gd
index f4159af..410d67d 100644
--- a/scenes/score_window/score_window.gd
+++ b/scenes/score_window/score_window.gd
@@ -1,10 +1,12 @@
extends Node2D
+signal donezo
+
var net_worth: Big
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
- net_worth = Big.new(1000)
+ net_worth = Big.new(10)
var window = get_window()
window.position = Vector2(450, 360)
@@ -14,6 +16,9 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
$Score.text = "Net worth: \n$%s" % net_worth.toString()
+
+ if net_worth.isLessThan(Big.new(0)):
+ donezo.emit()
func _on_stock_ticker_buy(amount: Variant) -> void: