summaryrefslogtreecommitdiff
path: root/scenes/main.gd
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-16 14:01:13 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-16 14:01:13 -0600
commit1a3455015d18921de0b037dcfd8a9b44a5e4e874 (patch)
tree68332ab43a3d4382b191e783ee784afb31fa6744 /scenes/main.gd
parent954ac4ef435c2f8746746f9422c8e726cb130901 (diff)
Buying takes from your net worth!
Diffstat (limited to 'scenes/main.gd')
-rw-r--r--scenes/main.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/scenes/main.gd b/scenes/main.gd
index e5dedb8..53da549 100644
--- a/scenes/main.gd
+++ b/scenes/main.gd
@@ -1,9 +1,11 @@
extends Node2D
+var net_worth: Big
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
_on_microgame_spawn_timer_timeout()
+ net_worth = Big.new(1000)
# Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -11,6 +13,8 @@ func _process(delta: float) -> void:
# The most important functionality
if Input.is_action_just_pressed("G"):
$Meow.play()
+
+ $Score.text = "Net worth: $%s" % net_worth.toString()
func _on_microgame_spawn_timer_timeout() -> void:
@@ -33,3 +37,7 @@ func _on_microgame_spawn_timer_timeout() -> void:
func _on_microgame_win(window: MicrogameWindow):
print("yay")
+
+
+func _on_stock_ticker_buy(amount: Variant) -> void:
+ net_worth = net_worth.minus(amount)