예제 #1
0
파일: Bootstrap.cs 프로젝트: mmatvein/snake
        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))));
        }
예제 #2
0
 public LoadingScene(MainApplication mainApplication)
 {
     this.mainApplication = mainApplication;
 }