Moving some of game to use MessageBus
This commit is contained in:
@@ -16,16 +16,12 @@ func connect_to_game() -> void:
|
||||
Globals.multiplayer_data.wait_for_connection_close()
|
||||
|
||||
# NOTE: Join target game server
|
||||
# TODO: Don't use libby client... Use a created game client.
|
||||
lobby_ui.client.start_client(
|
||||
Globals.game_data.game_address,
|
||||
Globals.game_data.game_port
|
||||
)
|
||||
|
||||
@rpc("authority", "call_local", "reliable")
|
||||
func load_game_scene(match_entry: Dictionary, is_player_1: bool) -> void:
|
||||
push_warning("Client load game scene...")
|
||||
lobby_ui.rpc_signals.match_list_entry_load_match.emit(match_entry, is_player_1)
|
||||
|
||||
@rpc("authority", "reliable")
|
||||
func go_back_to_match_screen() -> void:
|
||||
if multiplayer.is_server(): return
|
||||
@@ -35,16 +31,3 @@ func go_back_to_match_screen() -> void:
|
||||
Globals.game_state.set_game_scene(
|
||||
"res://scenes/screens/lobby_screen/lobby.tscn"
|
||||
)
|
||||
|
||||
# NOTE: Needed for hash check to pass between client and server but isn't used by client...
|
||||
@rpc("any_peer", "reliable")
|
||||
func match_list_add_entry(_match_entry: Dictionary) -> void:
|
||||
pass
|
||||
|
||||
@rpc("any_peer", "reliable")
|
||||
func match_list_remove_entry(_match_id: String) -> void:
|
||||
pass
|
||||
|
||||
@rpc("any_peer", "reliable")
|
||||
func match_list_join_entry(_match_id: String) -> void:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user