コード例 #1
0
 internal void Leave(TAccountModel player)
 {
     if (player.RoomToken == null)
     {
         return;
     }
     if (Players.Contains(player) && !_gameStarted)
     {
         player.RoomToken = null;
         Players.Remove(player);
         PlayerLeaved.Invoke(this, player);
     }
 }
コード例 #2
0
 /// <summary>
 /// Получает уведомление о выходе пользователя из-за игрового стола
 /// </summary>
 /// <param name="params"></param>
 /// <returns></returns>
 private void OnPlayerLeaved(OnPlayerLeavedParams @params)
 {
     PlayerLeaved?.Invoke(@params);
 }