mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-14 21:15:58 +00:00
Export: Use icon for export; Net: add comments
This commit is contained in:
parent
fbb4ab31cd
commit
40165394a9
@ -31,7 +31,7 @@ codesign/timestamp_server_url=""
|
||||
codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PoolStringArray( )
|
||||
application/icon=""
|
||||
application/icon="res://icon.ico"
|
||||
application/file_version=""
|
||||
application/product_version=""
|
||||
application/company_name=""
|
||||
|
@ -36,11 +36,14 @@ sync func receive(mail):
|
||||
# Sent it off to anything that expects mail
|
||||
emit_signal("incoming", mail)
|
||||
|
||||
# send: Called when sending a message
|
||||
# id: Peer ID of the recipient
|
||||
# mail: Variant of a json-encodable type (non-Object) to send
|
||||
func send(id, mail):
|
||||
# Make the recipient receive the mail
|
||||
rpc_id(id, "receive", to_json(mail))
|
||||
|
||||
# start_server: Host the game
|
||||
# start_host: Host the game
|
||||
# port: TCP port
|
||||
# max_players: Largest number of players allowed to connect at a time
|
||||
func start_host(port = DEFAULT_PORT, max_players = 2):
|
||||
@ -53,13 +56,14 @@ func start_host(port = DEFAULT_PORT, max_players = 2):
|
||||
hosting = true
|
||||
return
|
||||
|
||||
# connect_server: Connect to a host
|
||||
# connect_host: Connect to a host
|
||||
func connect_host(ip = LOCALHOST, port = DEFAULT_PORT):
|
||||
get_hostname()
|
||||
var peer = NetworkedMultiplayerENet.new()
|
||||
peer.create_client(ip, port)
|
||||
get_tree().network_peer = peer
|
||||
|
||||
# disconnect_host
|
||||
func disconnect_host():
|
||||
# Set state to disconnected
|
||||
connected = false
|
||||
|
Loading…
Reference in New Issue
Block a user