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

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

                _Instance = null;
                ServiceLocator.Instance.Dispose();
            }
        }
Exemplo 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;
        }