add basic networking

This commit is contained in:
2025-02-10 23:32:17 +10:00
parent 74aa8ddec4
commit 95eeab0dfe
9 changed files with 240 additions and 16 deletions

View File

@@ -0,0 +1,17 @@
extends Node
func _ready() -> void:
Networker.main_loaded.connect(_on_multiplayerer_main_loaded)
func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_cursor_capture"):
if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
else:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
func _on_multiplayerer_main_loaded() -> void:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED