Client environment selection dropdown

This commit is contained in:
Layla 2020-05-02 16:19:46 -04:00
parent ddf5275a37
commit 948b379f9d
No known key found for this signature in database
GPG Key ID: A494D9357BA1BE31
2 changed files with 5 additions and 6 deletions

Binary file not shown.

View File

@ -1,8 +1,7 @@
extends Node
const SERVER_HOST : String = "192.168.1.34"
#const SERVER_HOST : String = "stage.dt.cloudsumu.com"
#const SERVER_HOST : String = "dt-in-Publi-1S7VAU6QPEQHR-51ac8fd89ed249aa.elb.us-east-1.amazonaws.com"
var server_host : String = "127.0.0.1"
const SERVER_PORT : int = 7777
signal disconnection
@ -29,15 +28,15 @@ var connection_timer : Timer
func _init():
server_address = GDNetAddress.new()
server_address.set_host(SERVER_HOST)
server_address.set_port(SERVER_PORT)
client = GDNetHost.new()
client.set_max_peers(1)
client.set_event_wait(250)
client.bind()
func connect_to_server():
server_address.set_host(server_host)
server_address.set_port(SERVER_PORT)
peer = client.host_connect(server_address)
if not connection_timer:
connection_timer = Timer.new()