void Awake()
        {
            m_connectToServerOnStart = enabled;
            m_connectionManager      = new HFTConnectionManager(gameObject, happyfuntimesOptions);

            m_playerManager = new HFTPlayerManager(m_connectionManager.gameServer, gameObject, players.Length, timeoutForDisconnectedPlayersToReconnect, GetPlayer);
        }
        void Awake()
        {
            m_connectToServerOnStart = enabled;
            m_connectionManager      = new HFTConnectionManager(gameObject, happyfuntimesOptions);

            if (maxPlayers > 0)
            {
                int timeoutForDisconnectedPlayerToReconnect = 0;
                m_playerManager = new HFTPlayerManager(m_connectionManager.gameServer, gameObject, maxPlayers, timeoutForDisconnectedPlayerToReconnect, GetPrefab);
            }
            else
            {
                m_connectionManager.gameServer.OnPlayerConnect += StartNewPlayer;
            }
        }
示例#3
0
 void Awake()
 {
     m_connectToServerOnStart = enabled;
     m_connectionManager      = new HFTConnectionManager(gameObject, happyfuntimesOptions);
 }