mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 20:53:15 +00:00
docs: update UPnP gdscript snippet to latest gdscript
This commit adds usage of the new (stringless) signal API.
This commit is contained in:
parent
826de7976a
commit
a014705d64
@ -31,13 +31,13 @@
|
||||
|
||||
if err != OK:
|
||||
push_error(str(err))
|
||||
emit_signal("upnp_completed", err)
|
||||
upnp_completed.emit(err)
|
||||
return
|
||||
|
||||
if upnp.get_gateway() and upnp.get_gateway().is_valid_gateway():
|
||||
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "UDP")
|
||||
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "TCP")
|
||||
emit_signal("upnp_completed", OK)
|
||||
upnp_completed.emit(OK)
|
||||
|
||||
func _ready():
|
||||
thread = Thread.new()
|
||||
|
Loading…
Reference in New Issue
Block a user