void Start() { socket = GetComponent <SocketIOComponent>(); tetManager = GetComponent <TetManager>(); n_Client = GetComponent <NetworkClient>(); chatManager = GetComponent <ChattingManager>(); StartCoroutine(ConnectToServer()); socket.On("user_connected", OnUserConnected); socket.On("play_game", OnUserPlay); socket.On("other_map_display", OnOtherMapDisplay); socket.On("gameover", OnClientInformGameOver); socket.On("receive_message", OnReceiveMessage); }
void Start() { block = FindObjectOfType <Block>(); tetManager = FindObjectOfType <TetManager>(); }
private void Start() { tetManager = GetComponent <TetManager>(); NetworkManager.Instance.handler += GameStart; }