Skip to content

Commit

Permalink
Update Main.gd
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Jun 20, 2024
1 parent e08865c commit aefca08
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ func _ready() -> void:

$Button.connect("pressed", Callable(self, "_on_button_pressed"))
$SubViewportContainer/Label.text = "bananas: " + str(bananas)

var timer = Timer.new()
timer.wait_time = 1.0 # Set wait time to 2 seconds
timer.one_shot = false
add_child(timer)
timer.connect("timeout", Callable(self, "_on_Timer_timeout"))
timer.start() # Start the timer

func _on_Timer_timeout():
print("Timer timed out, calling function...")
$SteamStatus.text=str(Steam.getConnectedControllers()) + " " + str(Steam.getInputTypeForHandle(Steam.getControllerForGamepadIndex(0)))



func _on_button_pressed():
bananas += 1
Expand Down

0 comments on commit aefca08

Please sign in to comment.