void SetState(MatchmakingState state) { stateText.text = state.ToString(); }
void OnError(string error) { State = MatchmakingState.Error; Debug.Log(State); errorCallback?.Invoke(error ?? "Undefined Error"); }
/// <summary> /// Creates new event args with the given state. /// </summary> /// <param name="matchmakingState">The new matchmaking state.</param> /// <param name="subGroups">The subgroups that the matchamking state change occured for.</param> /// <param name="entities">The entities the matchmaking state change occurred for.</param> public MatchmakingStateChangedEventArgs(MatchmakingState matchmakingState, IEnumerable <EntityGroup <T> > subGroups, IEnumerable <T> entities) { this.MatchmakingState = matchmakingState; this.SubGroups = subGroups; this.Entities = entities; }
void OnSuccess(Assignment assignment) { State = MatchmakingState.Found; Debug.Log(State); successCallback?.Invoke(assignment); }
void GetAssignment() { matchmakingController.StartGetAssignment(player, OnSuccess, OnError); State = MatchmakingState.Searching; Debug.Log(State); }
void OnError(string error) { State = MatchmakingState.Error; Debug.Log(State); m_Error.Invoke(error); }
void OnSuccess(string connectionInfo) { State = MatchmakingState.Found; Debug.Log(State); m_Success.Invoke(connectionInfo); }
void GetAssignment() { matchmakingController.StartGetAssignment(MatchmakingRequest.Players[0].Id, OnSuccess, OnError); State = MatchmakingState.Searching; Debug.Log(State); }