Пример #1
0
 // Use this for initialization
 void Start()
 {
     filterDisplay     = GameObject.Find("Filter Display").GetComponent <Text> ();
     volumeDisplay     = GameObject.Find("Volume Display").GetComponent <Text> ();
     fullScreenDisplay = GameObject.Find("Full Screen Display").GetComponent <Text> ();
     playStyleDisplay  = GameObject.Find("Style Display").GetComponent <Text> ();
     otv          = GameObject.Find("Main Camera").GetComponent <OLDTVTube> ();
     us           = GameObject.Find("__app").GetComponent <UniversalSettings> ();
     changeVolume = false;
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        _oldtvtube = GetComponent <OLDTVTube>();

        string frontCam = WebCamTexture.devices[0].name;

        foreach (WebCamDevice device in WebCamTexture.devices)
        {
            if (device.isFrontFacing)
            {
                frontCam = device.name;
                break;
            }
        }

        Debug.Log("Using " + frontCam + " as webcam");
        WebCamTexture webcamTexture = new WebCamTexture(frontCam);

        // You can use any kind of texture as reflex, as your webcam or a render to texture
        _oldtvtube.reflex = webcamTexture;
        webcamTexture.Play();
    }
 private void Awake()
 {
     screen = GetComponent <OLDTVScreen>();
     tube   = GetComponent <OLDTVTube>();
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     otv = this.gameObject.GetComponent <OLDTVTube>();
     us  = GameObject.Find("__app").GetComponent <UniversalSettings> ();
 }