IEnumerator Init() { _gameId = ""; _gamePid = 0; while (_wsModule == null) { yield return(null); } yield return(_wsModule.SetupAsync(Server, null, OnMessage, (o, e) => Debug.Log($"WebSocket Close Code: {e.Code} Reason: {e.Reason}"), null)); _statemachine.Next(State.Connect); }
IEnumerator Init() { while (_wsModule == null) { yield return(null); } IsCancel = false; _matchingId = ""; GameServerAddress = ""; RoomId = ""; yield return(_wsModule.SetupAsync(Server, null, OnMessage, (o, e) => Debug.Log($"[ws] WebSocket Close Code: {e.Code} Reason: {e.Reason}"), null)); _statemachine.Next(State.Connect); }