示例#1
0
    IEnumerator StartLocalInitialization()
    {
        while (!_startLocalInit)
        {
            yield return(null);
        }
        // local client side set up
        NBoardManager.instance.Initialize();
        NPlayerInfoPanel.instance.Initialize(_players);
        NTurnButtonPanel.instance.Initialize();
        NDialogManager.instance.Initialize();
        NPlayer.Initialize();

        List <NPlayer> rearrangedPlayers = new List <NPlayer>();

        for (int i = 0; i < _players.Length; i++)
        {
            rearrangedPlayers.Add(Array.Find(_players, x => x.Order == i));
        }
        _players = rearrangedPlayers.ToArray();

        StartGame();
    }