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);
    }
Example #2
0
 void Start()
 {
     block      = FindObjectOfType <Block>();
     tetManager = FindObjectOfType <TetManager>();
 }
Example #3
0
 private void Start()
 {
     tetManager = GetComponent <TetManager>();
     NetworkManager.Instance.handler += GameStart;
 }