Client/scripts/match/current_match.gd

14 lines
339 B
GDScript3
Raw Permalink Normal View History

2025-03-05 11:35:40 +01:00
extends Node
enum State { NONE, RUNNING, WON, LOST }
var state: State = State.NONE
var opponent_name: String = ""
func start_game(msg: MatchEstablishedMessage) -> void:
self.opponent_name = msg.opponentName
self.state = State.RUNNING
MatchChannel.connect_socket(msg.token)
get_tree().change_scene_to_file("res://scenes/game.tscn")