18 lines
507 B
GDScript3
18 lines
507 B
GDScript3
|
|
class_name GamManagerMultiplayer extends GamManagerBase
|
||
|
|
|
||
|
|
|
||
|
|
func setup_multiplayer() -> void:
|
||
|
|
if not Globals.multiplayer_data.is_multiplayer_active: return
|
||
|
|
if multiplayer.is_server(): return
|
||
|
|
|
||
|
|
Globals.game_state.balls_stopped_moving.disconnect(_balls_stopped_moving)
|
||
|
|
|
||
|
|
@rpc("authority", "call_local", "reliable")
|
||
|
|
func reap_ball(ball_pth: String) -> void:
|
||
|
|
var ball = get_node(ball_pth)
|
||
|
|
|
||
|
|
push_warning("Ball sunk: ", ball_pth)
|
||
|
|
|
||
|
|
Globals.multiplayer_data.remove_tracking_of_ball( ball_pth )
|
||
|
|
ball.queue_free()
|