Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     VOMan     = GameObject.FindObjectOfType <VoiceOverEventManager> ();
     SubButton = this.GetComponentInChildren <MenuSimpleButton> ();
     UpdateFromVOMan();
     VOMan.OnTrackChanged += (newTrackOrNull) => { this.UpdateFromVOMan(); };
     this.UpdateFromVOMan();
 }
Beispiel #2
0
    public void EnsureSetup()
    {
        if (mIsSetup)
        {
            return;
        }
        mIsSetup = true;
        mMain    = this;

        State = new AppState();

        if (!this.Shared)
        {
            this.Shared = GameObject.FindObjectOfType <ExcersizeSharedScheduler> ();
        }
        this.AudioManager = GameObject.FindObjectOfType <VoiceOverEventManager> ();
    }
    public void EnsureStarted()
    {
        if (mStarted)
        {
            return;
        }
        mStarted = false;

        if (!VOManager)
        {
            VOManager = GameObject.FindObjectOfType <VoiceOverEventManager>();
        }

        if (Application.platform == RuntimePlatform.Android)
        {
            this.Status = "local";
            return;
        }

        this.Status = "Connecting...";
#if USE_FIREBASE
        FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
            var dependencyStatus = task.Result;
            if (dependencyStatus == DependencyStatus.Available)
            {
                EchoLine("Initializing...");
                InitializeFirebase();
            }
            else
            {
                Debug.LogError(
                    "Could not resolve all Firebase dependencies: " + dependencyStatus);
            }
        });
#endif
    }