コード例 #1
0
ファイル: UserService.php プロジェクト: samizdam/Kingdom
 /**
  * Запрос всех онлайн игроков в комнате
  * @param Room $room
  * @param int|array $excludePlayerIds
  * @return Human[]
  */
 public function getOnlineHumansInRoom(Room $room, $excludePlayerIds = []) : array
 {
     if (!is_array($excludePlayerIds)) {
         $excludePlayerIds = [$excludePlayerIds];
     }
     return $this->humanRepository->findOnlineByRoom($room, $this->getOnlineUsersIds(), $excludePlayerIds);
 }