diff options
Diffstat (limited to 'scenes/stockticker/stonks.gd')
-rw-r--r-- | scenes/stockticker/stonks.gd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scenes/stockticker/stonks.gd b/scenes/stockticker/stonks.gd index 508fb82..96ea000 100644 --- a/scenes/stockticker/stonks.gd +++ b/scenes/stockticker/stonks.gd @@ -1,5 +1,7 @@ extends Node2D +signal transaction(amount: float) + const MAX_PRICES = 15 const Y_START = 60 @@ -158,6 +160,7 @@ func _on_buy_button_button_up() -> void: shares += 1 shares_label.text = "Shares\nHeld:%d" % shares hype_mult += hype_inc + transaction.emit(-prev_price) func _on_sell_button_button_up() -> void: @@ -165,3 +168,4 @@ func _on_sell_button_button_up() -> void: shares -= 1 shares_label.text = "Shares\nHeld:%d" % shares panic_mult += panic_inc + transaction.emit(prev_price) |