Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        syncFromClients = GetComponent <NetworkSyncToHost>();
        // create host
        int playerNum = 0;

        hostPlayer = CreatePlayer(-1, ref playerNum);
        // create other players
        foreach (int peerID in GameController.Instance.host.Peers)
        {
            clientPlayers[peerID] = CreatePlayer(peerID, ref playerNum);
        }
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     syncToHost = GetComponent <NetworkSyncToHost>();
 }