国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

BrowserQuest項(xiàng)目有個(gè)地方是不是拼錯(cuò)了?

WGYHAPPY
2975 5 0
5個(gè)回答

WGYHAPPY

WorldServer.php 文件 1306行, updatePopulation函數(shù):

public function updatePopulation($totalPlayers) 
{
    $this->pushBroadcast(new Messages\Population($this->playerCount, $totalPlayers ? $totalPlayers : $this->playerCount));
}
  • 暫無(wú)評(píng)論
walkor 打賞

額,沒(méi)看出來(lái)哪里錯(cuò)了。
應(yīng)該怎么拼呢?

  • 暫無(wú)評(píng)論
WGYHAPPY

下面是 Population 類(lèi):

<?php 
/**
 * This file is part of workerman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link http://wtbis.cn/
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 */
namespace Server\Messages;

class Population
{
    public $world = 0;
    public $total = 0;
    public function __construct($world, $total)
    {
        $this->world = $world;
        $this->total = $total;
    }

    public function serialize()
    {
        return array(TYPES_MESSAGES_POPULATION, 
                $this->world,
                $this->total, 
        );
    }
}

然后,new 一個(gè) Messages\Population對(duì)象的時(shí)候,第一個(gè)參數(shù)不應(yīng)該是一個(gè)worldServer的實(shí)例嗎?好像不應(yīng)該是$this->playerCount?

  • 暫無(wú)評(píng)論
walkor 打賞

沒(méi)錯(cuò)

  • 暫無(wú)評(píng)論
WGYHAPPY

嗯。

  • 暫無(wú)評(píng)論
年代過(guò)于久遠(yuǎn),無(wú)法發(fā)表回答
??