private bool IsInitializationCompleted() { bool isAuthorizationCompleted = authSingleton.IsAuthorizationCompleted(); bool warshipsCreationCompleted = lobbyEcsController.IsWarshipsCreationCompleted(); bool isUnityEditor = IsUnityEditor(); bool initializationCompleted = isAuthorizationCompleted && warshipsCreationCompleted; bool result = initializationCompleted || isUnityEditor; float currentTime = Time.time; if (_nextLogTime < currentTime) { log.Info($"time {nameof(isAuthorizationCompleted)} {isAuthorizationCompleted}" + $" {nameof(warshipsCreationCompleted)} {warshipsCreationCompleted}"); _nextLogTime += currentTime + 1; } if (_isAuthCompleted != isAuthorizationCompleted) { log.Info($"_isAuthCompleted changed {nameof(isAuthorizationCompleted)} {isAuthorizationCompleted}" + $" {nameof(warshipsCreationCompleted)} {warshipsCreationCompleted}"); _isAuthCompleted = isAuthorizationCompleted; } if (_isWarshipsCompleted != warshipsCreationCompleted) { log.Info($"_isWarshipsCompleted changed {nameof(isAuthorizationCompleted)} {isAuthorizationCompleted}" + $" {nameof(warshipsCreationCompleted)} {warshipsCreationCompleted}"); _isWarshipsCompleted = warshipsCreationCompleted; } return(result); }