From fa4d63110a3e12d0242b6e6ddcded74d04480f28 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Thu, 28 May 2026 20:16:38 -0400 Subject: Initial commit --- 2026/examples/godot/project/main.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 2026/examples/godot/project/main.gd (limited to '2026/examples/godot/project/main.gd') diff --git a/2026/examples/godot/project/main.gd b/2026/examples/godot/project/main.gd new file mode 100644 index 0000000..051ee04 --- /dev/null +++ b/2026/examples/godot/project/main.gd @@ -0,0 +1,16 @@ +extends Node + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + JavaScriptBridge.eval("window.parent.postMessage({op: \"ready\"});") + +var started = false +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + if !started && JavaScriptBridge.eval("window.lcolonqJamStart || -1.0") > 0.0: + started = true + JavaScriptBridge.eval("window.parent.postMessage({op: \"started\"});") + +func _input(event) -> void: + if event is InputEventMouseButton: + JavaScriptBridge.eval("window.parent.postMessage({op: \"done\", win: true});") -- cgit v1.2.3