Added Glitch Room Source code to Gitty
This commit is contained in:
commit
1ac9eb5644
505 files changed
+28504
No files matched your search
@@ -0,0 +1,25 @@
|
||||
extends SceneTree
|
||||
var activated := false
|
||||
func _initialize() -> void:
|
||||
call_deferred("run")
|
||||
func run() -> void:
|
||||
var hardware = root.get_node("HardwareManager")
|
||||
hardware.action_activated.connect(func(_cabinet, _action, _context): activated = true)
|
||||
var launcher = load("res://games/launcher/ArcadeLauncher.tscn").instantiate()
|
||||
root.add_child(launcher)
|
||||
await process_frame
|
||||
await process_frame
|
||||
if is_instance_valid(launcher.setup):
|
||||
launcher.setup.close()
|
||||
await process_frame
|
||||
launcher._select(0)
|
||||
launcher.launch()
|
||||
launcher.game.start_game()
|
||||
launcher.game.win_game()
|
||||
await create_timer(1.0).timeout
|
||||
if not activated:
|
||||
push_error("Pac-Man win did not reach GPIO bridge: " + hardware.status)
|
||||
quit(1)
|
||||
else:
|
||||
print("Pac-Man win reached GPIO bridge")
|
||||
quit()
|
||||
Reference in new issue
Block a user