Esempio n. 1
0
        public void Init()
        {
            _gcSpeechRecognition = GCVision.Instance;

            _networking = new Networking();
            _networking.NetworkResponseEvent += NetworkResponseEventHandler;
        }
Esempio n. 2
0
        private void OnDestroy()
        {
            if (_Instance == this)
            {
                _visionManager.AnnotateSuccessEvent -= AnnotateSuccessEventHandler;
                _visionManager.AnnotateFailedEvent  -= AnnotateFailedEventHandler;

                _Instance = null;
                ServiceLocator.Instance.Dispose();
            }
        }
Esempio n. 3
0
        private void Awake()
        {
            if (_Instance != null)
            {
                Destroy(gameObject);
                return;
            }

            if (isDontDestroyOnLoad)
            {
                DontDestroyOnLoad(gameObject);
            }

            _Instance = this;

            _serviceLocator = new ServiceLocator();
            _serviceLocator.InitServices();

            _visionManager = _serviceLocator.Get <IVisionManager>();

            _visionManager.AnnotateSuccessEvent += AnnotateSuccessEventHandler;
            _visionManager.AnnotateFailedEvent  += AnnotateFailedEventHandler;
        }