Change to correct RPC syntax in Multiplayer bomber demo (#802)

This commit is contained in:
Rafael Correa
2022-12-04 15:36:52 -03:00
committed by GitHub
parent fa0fce0eb6
commit 1b2ce74a39
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ func explode():
for p in in_area:
if p.has_method("exploded"):
# Exploded can only be called by the authority, but will also be called locally.
p.rpc(&"exploded", from_player)
p.exploded.rpc(from_player)
func done():

View File

@@ -27,7 +27,7 @@ signal game_error(what)
# Callback from SceneTree.
func _player_connected(id):
# Registration of a client beings here, tell the connected player that we are here.
rpc_id(id, StringName("register_player"), player_name)
register_player.rpc_id(id, player_name)
# Callback from SceneTree.