Exemplo n.º 1
0
 void EnqueuePreStageServiceResolution(bool blocking)
 {
     EnqueueServiceResolution <IConfigurationService>(s => _configurationService = s, blocking);
     EnqueueServiceResolution <IModalityManager>(s => _modalityManager           = s, blocking);
     EnqueueServiceResolution <IBackButtonService>(s => _backButtonService       = s, blocking);
     EnqueueServiceResolution <IGeneralDialogService>(s => _generalDialogService = s, blocking);
 }
Exemplo n.º 2
0
        protected override IEnumerator ModuleInitializer()
        {
#if UNITY_EDITOR
            if (!activeInEditor)
            {
                yield break;
            }
#endif
            Debug.Log("Handshake Start ------------");
            _dialogService = _serviceResolver.Get <IGeneralDialogService>();

            _handshakeState = HandshakeLoopState.TryHandshake;

            _connectionHandler = new ConnectionHandler();
            _connectionHandler.Init(null, this);


            while (_handshakeState != HandshakeLoopState.CanContinue)
            {
                if (_handshakeState == HandshakeLoopState.TryHandshake)
                {
                    yield return(StartCoroutine(_connectionHandler.SendRequest(ConnectionHandler.RequestType.GetVersion, HandleHandshakeResponse)));
                }
                else
                {
                    yield return(new WaitForSeconds(1.0f));
                }
            }

            Debug.Log("Handshake end ------------");
            yield break;
        }