mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
Added a new platformer demo entirely made with visual script.
This commit is contained in:
@@ -66,6 +66,7 @@ func _set_status(text,isok):
|
||||
func _on_host_pressed():
|
||||
|
||||
var host = NetworkedMultiplayerENet.new()
|
||||
host.set_compression_mode(NetworkedMultiplayerENet.COMPRESS_RANGE_CODER)
|
||||
var err = host.create_server(DEFAULT_PORT,1) # max: 1 peer, since it's a 2 players game
|
||||
if (err!=OK):
|
||||
#is another server running?
|
||||
@@ -85,6 +86,7 @@ func _on_join_pressed():
|
||||
return
|
||||
|
||||
var host = NetworkedMultiplayerENet.new()
|
||||
host.set_compression_mode(NetworkedMultiplayerENet.COMPRESS_RANGE_CODER)
|
||||
host.create_client(ip,DEFAULT_PORT)
|
||||
get_tree().set_network_peer(host)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user