Ejemplo n.º 1
0
        public static IObservable <Unit> StartGame()
        {
            return(Observable.Create <MainApplication>(subscriber =>
            {
                GameObject mainObject = new GameObject("Main Application");
                GameObject.DontDestroyOnLoad(mainObject);
                MainApplication mainApp = mainObject.AddComponent <MainApplication>();

                AssetBundleManager assetBundleManager = new AssetBundleManager();
                SceneManager sceneManager = new SceneManager(assetBundleManager);
                mainApp.Init(assetBundleManager, sceneManager);

                subscriber.OnNext(mainApp);
                subscriber.OnCompleted();

                return Disposable.Empty;
            })
                   .SelectMany(mainApp => mainApp.ChangeScene(new LoadingScene(mainApp))));
        }
Ejemplo n.º 2
0
 public LoadingScene(MainApplication mainApplication)
 {
     this.mainApplication = mainApplication;
 }