Improved network code

This commit is contained in:
2024-01-15 17:08:26 +01:00
parent 9b47e374c7
commit b885d70625
17 changed files with 241 additions and 72 deletions

21
world/Game.gd Normal file
View File

@ -0,0 +1,21 @@
extends Node
func _ready():
# Capture mouse
#Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
# Mute audio
var master_sound = AudioServer.get_bus_index("Master")
AudioServer.set_bus_mute(master_sound, true)
func _input(event):
if event.is_action_pressed("toggle_fullscreen"):
var mode = DisplayServer.window_get_mode()
match mode:
DisplayServer.WINDOW_MODE_FULLSCREEN:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
_:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
return