Beispiel #1
0
    public void ConnectServer(PLAY_TYPE type, string serverAddr, int port, string playerSessionId)
    {
        LastMatchInfo = new MatchInfo()
        {
            ServerAddress     = serverAddr,
            Port              = port,
            PlayerGameSession = playerSessionId,
            PlayType          = type,
        };

        if (type == PLAY_TYPE.BATTLE)
        {
            GameStateManager.Get().MoveInGameBattle();
        }
        else if (type == PLAY_TYPE.CO_OP)
        {
            GameStateManager.Get().MoveInGameCoop();
        }
        else
        {
            Debug.LogError($"지원하지 않는 모드로 서버 접속 요청이 들어왔습니다. {type.ToString()}");
        }
    }