예제 #1
0
 internal void SetPlayerLeftStatus(RoomStatusResponse response)
 {
     //GameConstants.SOCKET_URL_PREFIX;
     foreach (var player in response.roomInfo)
     {
         PlayerUIController v_Player = null;
         if (player.userId == int.Parse(GameVariables.userId))
         {
             v_Player = playerController;
         }
         else
         {
             v_Player = gamePlayers.Find(x => x.userId == player.userId);
         }
         if (v_Player == null)
         {
             Debug.LogError("Setting Player status null error" + player.userId + ":" + player.userName);
             continue;
         }
         if (player.status == GameConstants.ROOM_PLAYER_ACTIVE && !player.isDropped)
         {
             v_Player.ResetTimerColor();
         }
         else
         {
             v_Player.GrayOutTimer();
         }
     }
 }
예제 #2
0
 internal void OnPlayerLeft(int userid)
 {
     if (userid == int.Parse(GameVariables.userId))
     {
         playerController.GrayOutTimer();
         return;
     }
     foreach (var player in gamePlayers)
     {
         if (player.userId == userid)
         {
             player.GrayOutTimer();
         }
     }
 }