Exemple #1
0
 /// <summary>
 /// передаем ход другому пользователю
 /// </summary>
 public static ResultModel ChangeActiveUser(int sessionId)
 {
     try {
         var result = InternalPlayerManager.InternalChangeActiveUser(sessionId);
         if (result == null)
         {
             return(new ResultModel(false, "Something wrong"));
         }
         return(new ResultModel(true, result));
     } catch (Exception ex) {
         return(new ResultModel(false, ex.Message));
     }
 }
Exemple #2
0
 /// <summary>
 /// активируем пользователя при первом подключении
 /// </summary>
 public static ResultModel ActivateUser(int sessionId, int userId)
 {
     try {
         var result = InternalPlayerManager.InternalActivateUser(userId, sessionId);
         if (result == null)
         {
             return(new ResultModel(false, "Something wrong"));
         }
         return(new ResultModel(true, result));
     } catch (Exception ex) {
         Logger.Error($"ActivateUser {ex.Message}");
         return(new ResultModel(false));
     }
 }