void Start() { _carcounter = GetComponent <CarCounter> (); _eventsystem = GetComponent <EventSystem> (); _synccolor = GetComponent <SyncColor> (); _synccolor.sync(); }
private void CarCounterRemove() { if (carCounter != null) { carCounter.OnCarsDetected -= this.OnCarsDetected; carCounter.Dispose(); carCounter = null; } }
private void CarCounterAdd() { carCounter = new CarCounter() { ContoursDraw = cbCCDraw.Checked, TrackingLineDraw = cbCCDraw.Checked, CounterDraw = cbCCDraw.Checked }; carCounter.Init(); carCounter.OnCarsDetected += this.OnCarsDetected; }