diff options
| author | LLLL Colonq <llll@colonq> | 2026-06-02 04:31:13 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-06-02 04:31:13 -0400 |
| commit | 45e643d306e5fccfbf21fa75373a66275212cdb2 (patch) | |
| tree | 8c4593ca5adefd423e70a311220e63fdd7dfe6bd /2026/examples/godot/project | |
| parent | ab80e4583b53a7b424563cbd17ba2bf95e168cc9 (diff) | |
Multiple games loaded at once
Diffstat (limited to '2026/examples/godot/project')
| -rw-r--r-- | 2026/examples/godot/project/export_presets.cfg | 2 | ||||
| -rw-r--r-- | 2026/examples/godot/project/main.gd | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/2026/examples/godot/project/export_presets.cfg b/2026/examples/godot/project/export_presets.cfg index 9d45cd8..5633989 100644 --- a/2026/examples/godot/project/export_presets.cfg +++ b/2026/examples/godot/project/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../output/game.html" +export_path="../output/index.html" patches=PackedStringArray() patch_delta_encoding=false patch_delta_compression_level_zstd=19 diff --git a/2026/examples/godot/project/main.gd b/2026/examples/godot/project/main.gd index 051ee04..268afbc 100644 --- a/2026/examples/godot/project/main.gd +++ b/2026/examples/godot/project/main.gd @@ -2,15 +2,15 @@ extends Node # Called when the node enters the scene tree for the first time. func _ready() -> void: - JavaScriptBridge.eval("window.parent.postMessage({op: \"ready\"});") + 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\"});") + 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});") + if event is InputEventMouseButton: + JavaScriptBridge.eval("window.parent.postMessage({op: \"done\", win: true});") |
