当前位置: 首页>>代码示例>>PHP>>正文


PHP Lobby::lobbyserver方法代码示例

本文整理汇总了PHP中Lobby::lobbyserver方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::lobbyserver方法的具体用法?PHP Lobby::lobbyserver怎么用?PHP Lobby::lobbyserver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lobby的用法示例。


在下文中一共展示了Lobby::lobbyserver方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: joinTeam

     if (isset($team) && freeslots($lid, $team) > 0) {
         joinTeam($id, $team);
     }
     break;
 case "switchClass":
     if (isset($class)) {
         switchClass($id, $class);
     }
     break;
 case "readystatus":
     if (isset($ready)) {
         readystatus($id, false, $ready);
     }
     break;
 case "startGame":
     $server = new Server($lobby->lobbyserver($lid));
     if ($server->id == 1) {
         $location = getPlayersLocation($lid);
         $servers = getOnlineServers();
         $server = new Server(bestServer($location, $servers));
         updateLobbyServer($lid, $server->id);
     }
     startLobby($lid);
     $players = teamplayers($lobby->type) * 2;
     $server->loadConfig($players, etf2l, $lobby->map);
     break;
 case "joinGame":
     if (!isPlayerInLobby($uid) && countPlayers($lid) != 2 * teamplayers($lobby->type)) {
         joinLobby($uid, $lid);
     }
     if (isPlayerInLobby($uid) != $lid) {
开发者ID:marat1803,项目名称:tf2matchmaking,代码行数:31,代码来源:api.php

示例2: getLPid

<?php

require_once 'includes/header.php';
$css = 'style.css';
$pid = $_SESSION['id'];
$lid = $_REQUEST['id'];
if ($pid) {
    $id = getLPid($pid, $lid);
    $lobby = new Lobby($lid);
    $user = new User($pid);
    $sid = $lobby->lobbyserver($lid);
    $mid = $lobby->mid;
    $server = new Server($sid);
    $mumble = new Mumble($mid);
    switch ($lobby->status) {
        case "open":
            $js = 'lobby.js';
            $ready = false;
            include_once 'includes/header.inc';
            include_once 'includes/pages/lobby.inc';
            break;
        case "ready":
            $js = 'lobby.js';
            $ready = true;
            include_once 'includes/header.inc';
            include_once 'includes/pages/lobby.inc';
            break;
        case "ingame":
        case "finished":
        case "closed":
            $js = 'lobby_start.js';
开发者ID:marat1803,项目名称:tf2matchmaking,代码行数:31,代码来源:lobby.php


注:本文中的Lobby::lobbyserver方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。