1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2024-11-15 05:25:57 +00:00

Export: Use icon for export; Net: add comments

This commit is contained in:
John 2021-11-23 00:05:55 -06:00
parent fbb4ab31cd
commit 40165394a9
2 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,7 @@ codesign/timestamp_server_url=""
codesign/digest_algorithm=1 codesign/digest_algorithm=1
codesign/description="" codesign/description=""
codesign/custom_options=PoolStringArray( ) codesign/custom_options=PoolStringArray( )
application/icon="" application/icon="res://icon.ico"
application/file_version="" application/file_version=""
application/product_version="" application/product_version=""
application/company_name="" application/company_name=""

View File

@ -36,11 +36,14 @@ sync func receive(mail):
# Sent it off to anything that expects mail # Sent it off to anything that expects mail
emit_signal("incoming", 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): func send(id, mail):
# Make the recipient receive the mail # Make the recipient receive the mail
rpc_id(id, "receive", to_json(mail)) rpc_id(id, "receive", to_json(mail))
# start_server: Host the game # start_host: Host the game
# port: TCP port # port: TCP port
# max_players: Largest number of players allowed to connect at a time # max_players: Largest number of players allowed to connect at a time
func start_host(port = DEFAULT_PORT, max_players = 2): func start_host(port = DEFAULT_PORT, max_players = 2):
@ -53,13 +56,14 @@ func start_host(port = DEFAULT_PORT, max_players = 2):
hosting = true hosting = true
return return
# connect_server: Connect to a host # connect_host: Connect to a host
func connect_host(ip = LOCALHOST, port = DEFAULT_PORT): func connect_host(ip = LOCALHOST, port = DEFAULT_PORT):
get_hostname() get_hostname()
var peer = NetworkedMultiplayerENet.new() var peer = NetworkedMultiplayerENet.new()
peer.create_client(ip, port) peer.create_client(ip, port)
get_tree().network_peer = peer get_tree().network_peer = peer
# disconnect_host
func disconnect_host(): func disconnect_host():
# Set state to disconnected # Set state to disconnected
connected = false connected = false