void SetState(MatchmakingState state)
 {
     stateText.text = state.ToString();
 }
Пример #2
0
 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;
 }
Пример #4
0
 void OnSuccess(Assignment assignment)
 {
     State = MatchmakingState.Found;
     Debug.Log(State);
     successCallback?.Invoke(assignment);
 }
Пример #5
0
 void GetAssignment()
 {
     matchmakingController.StartGetAssignment(player, OnSuccess, OnError);
     State = MatchmakingState.Searching;
     Debug.Log(State);
 }
Пример #6
0
 void OnError(string error)
 {
     State = MatchmakingState.Error;
     Debug.Log(State);
     m_Error.Invoke(error);
 }
Пример #7
0
 void OnSuccess(string connectionInfo)
 {
     State = MatchmakingState.Found;
     Debug.Log(State);
     m_Success.Invoke(connectionInfo);
 }
Пример #8
0
 void GetAssignment()
 {
     matchmakingController.StartGetAssignment(MatchmakingRequest.Players[0].Id, OnSuccess, OnError);
     State = MatchmakingState.Searching;
     Debug.Log(State);
 }