add basic networking
This commit is contained in:
17
scripts/globals/cursorer.gd
Normal file
17
scripts/globals/cursorer.gd
Normal 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
|
||||
Reference in New Issue
Block a user