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

BrowserQuest項目有個地方是不是拼錯了?

WGYHAPPY
2978 5 0
5個回答

WGYHAPPY

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

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

額,沒看出來哪里錯了。
應(yīng)該怎么拼呢?

  • 暫無評論
WGYHAPPY

下面是 Population 類:

<?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://m.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 一個 Messages\Population對象的時候,第一個參數(shù)不應(yīng)該是一個worldServer的實例嗎?好像不應(yīng)該是$this->playerCount?

  • 暫無評論
walkor 打賞

沒錯

  • 暫無評論
WGYHAPPY

嗯。

  • 暫無評論
年代過于久遠(yuǎn),無法發(fā)表回答
??