Who knows what

This commit is contained in:
Dan 2026-01-28 13:22:04 +00:00
parent 0fe23420ab
commit 9214d13054
422 changed files with 1412 additions and 4783 deletions

View file

@ -2,12 +2,28 @@ extends Node
var tick: Timer
var tick_count: int = 0
@onready var tick_process: TickProcess = TickProcess.new()
var bridge = null
signal currency_goal_met()
func _ready():
#var simulator = UnlockSimulator.new()
#add_child(simulator)
Unlocks.apply_modifiers()
setup_tick_timer()
if OS.has_feature("web"):
bridge = JavaScriptBridge.get_interface("godotBridge")
func check_currency_goal():
if Global.game_continue_pressed == false:
if Inventory.get_currency() >= Global.target_currency:
currency_goal_met.emit()
## TODO
## Update this so there's some javascript that does something
## Maybe needs offloading to whatever UI we show when the game
## goal is completed. TBD.
if bridge != null:
bridge.ping()
func setup_tick_timer():
tick = Timer.new()
@ -19,5 +35,4 @@ func setup_tick_timer():
func _on_tick_timeout():
tick_count += 1
tick_process.tick()
Log.pr("Tick", str(tick_count))
Log.pr("Current Currency:", Inventory.get_currency())
check_currency_goal()