Ejemplo n.º 1
0
 /// <summary>
 /// Starts the internal <see cref="ColorTracker"/> instance.
 /// </summary>
 public void StartColorTracker()
 {
     if (_tracker)
     {
         _tracker.Start();
     }
 }
Ejemplo n.º 2
0
        void Awake()
        {
            switch (inputType)
            {
            case InputType.WebCam: _selectedInput = new WebCamInput(); break;

            case InputType.Screen: _selectedInput = new ScreenInput(); break;
            }

            _tracker = new ColorTracker(_selectedInput);
            _tracker.colorTargets = colorTargets;
            _tracker.accuracy     = accuracy;
            _tracker.listener     = this;

            if (playOnAwake)
            {
                _tracker.Start();
            }
        }