//private constructor used to prevent creating instances of the class private CameraConnection() { _cameraListIndex = 0; _reader = new ReadBarcode(); _timer = new TimerClock(2000); _timer.GetTimer().Elapsed += new ElapsedEventHandler(TimeHandler); CamerasList = new ObservableCollection <string>(); _filterInfoCollection = new FilterInfoCollection(FilterCategory.VideoInputDevice); _output = new Output(); foreach (FilterInfo device in _filterInfoCollection) { CamerasList.Add(device.Name); } _videoCaptureDevice = new VideoCaptureDevice(_filterInfoCollection[_cameraListIndex].MonikerString); }
//public float windDirection; private void OnTriggerStay(Collider other) { if (other.gameObject.CompareTag("Player")) { Rigidbody rb = other.gameObject.GetComponent <Rigidbody>(); Vector3 windForce = new Vector3(-windPower, 0, 0); rb.AddForce(windForce); } if (other != null) { ITimer otherTimer = other.gameObject.GetComponent <ITimer>(); if (otherTimer != null) { otherTimer.GetTimer(); otherTimer.Countdown(2); } } }