예제 #1
0
    // Use this for initialization
    void Awake()
    {
        Debug.Log("NextGameConnectionType: " + NextGameConnectionType);

        Inst = this;
        vnet = new VNet();
        vnet.Init();


        vTransformMan = GetComponent <VNetTransformManager>();

        // This needs to update at least once a second
        if (TransformUpdatesPerSecond == 0)
        {
            TransformUpdatesPerSecond = 1;
        }

        NoConnection  = true;
        LocalIsHost   = false;
        LocalIsClient = false;



        StartAttemptToConnect();
    }
예제 #2
0
    // Update is called once per frame
    void LateUpdate()
    {
        vnet.Update();
        UpdateAttemptToConnect();


        if (DoReconnectButton)
        {
            DoReconnectButton = false;
            vnet.DisconnectAll();
            vnet.Init();
        }
    }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     vnet = new VNet();
     vnet.Init();
     vnet.StartHosting(0);
 }