Exemple #1
0
    private KinectManager manager;                            // the kinect manager to get the observator eyes positions

    // Use this for initialization
    void Start()
    {
        // gets the manager and the app configuration object
        manager = Camera.main.GetComponent <KinectManager> ();
        configs = GameObject.Find("ConfigurationsManager").GetComponent <LoadConfigurations>().LoadedConfigs;
        if (null != configs)
        {
            // Check if the network should be enabled
            if (configs.IsNetworkEnabled)
            {
                // get ip adress and port from config
                ipAddress = configs.IpAddress;
                port      = configs.Port;
                // if the app is actually a client then connect
                if (!configs.isServer)
                {
                    StartCoroutine(ConnectionRoutine());
                }
                else
                {
                    Network.InitializeServer(4, port, false);                   //else start server on port without NAT
                }
            }
        }
    }
Exemple #2
0
    private LoadConfigurations.Configurations configs = null; // app configuration object

    private void Start()
    {
        //get the manager, the view and the app config object
        manager = Camera.main.GetComponent <KinectManager> ();
        view    = GetComponent <NetworkView> ().isMine ? null : GetComponent <NetworkView> ();
        configs = GameObject.Find("ConfigurationsManager").GetComponent <LoadConfigurations>().LoadedConfigs;
        initMatrix();          //initialize conversion matrix
    }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     LoadConfigurations.Configurations configs = GameObject.Find("ConfigurationsManager").GetComponent <LoadConfigurations> ().LoadedConfigs;
     if (configs != null)
     {
         transform.localScale = configs.ScreenScale;
         transform.position   = configs.ScreenCenter;
         transform.rotation   = Quaternion.Euler(270.0f, 0.0f, 0.0f);            // rotate of 270° on x axis to place the screen in front of camera
         Debug.Log("Screen configured");
     }
 }