Ejemplo n.º 1
0
        private void Initialize(string externalResourcesPath, string shareResourcesPath)
        {
            // コンパイルが始まったら閉じる.
            CompileNotification.OnCompileStartAsObservable()
            .Subscribe(_ => Close())
            .AddTo(Disposable);

            // AssetManagement.

            assetManagement = AssetManagement.Instance;

            assetManagement.Initialize();

            // HeaderView.

            headerView = new HeaderView();

            headerView.Initialize(assetManagement);

            headerView.OnRequestRepaintAsObservable()
            .Subscribe(_ => Repaint())
            .AddTo(Disposable);

            headerView.OnChangeSelectCategoryAsObservable()
            .Subscribe(_ =>
            {
                manageAssetView.SetCategory(headerView.Category);
            })
            .AddTo(Disposable);

            // ManageAssetView.

            manageAssetView = new ManageAssetView();

            manageAssetView.Initialize(assetManagement, externalResourcesPath, shareResourcesPath);

            manageAssetView.OnRequestRepaintAsObservable()
            .Subscribe(_ => Repaint())
            .AddTo(Disposable);

            manageAssetView.SetCategory(headerView.Category);
        }
Ejemplo n.º 2
0
        private void Initialize(string externalResourcesPath, AssetManageConfig assetManageConfig)
        {
            // コンパイルが始まったら閉じる.
            CompileNotification.OnCompileStartAsObservable()
            .Subscribe(_ => Close())
            .AddTo(Disposable);

            assetManageConfig.Optimisation();

            assetManageModel = new AssetManageModel();
            assetManageModel.Initialize();

            assetManageManager = new AssetManageManager();
            assetManageManager.Initialize(externalResourcesPath, assetManageConfig);

            manageAssetView = new ManageAssetView();
            manageAssetView.Initialize(assetManageModel, assetManageManager);

            assetManageModel.OnRequestRepaintAsObservable().Subscribe(_ => Repaint()).AddTo(Disposable);
        }