Exemple #1
0
        // 各種設定・情報読み込みがすべて完了した際の処理
        void OnSettingInfoLoadCompleted()
        {
            /******各種設定反映*************************************************************************************/
            // GameController経由で取得・設定
            // ・上昇速度倍率上限下限
            // ・高度上限下限
            // ・ハイスコア
            sInfo.SetMinMagnification(gameController.SpeedMinMagnification);
            sInfo.SetMaxMagnification(gameController.SpeedMaxMagnification);
            hInfo.SetStartHeight(gameController.HeightMin);
            hInfo.SetGoalHeight(gameController.HeightMax);
            score.SetHiScore(gameController.HiScore);

            /******各種監視*************************************************************************************/
            // GameController監視(上昇速度倍率, 現在高度, コンボ数, ...)
            gameController.SpeedMagReactiveProperty.DistinctUntilChanged().Subscribe(x => sInfo.UpdateCurrentSpeed(x));
            gameController.HeightReactiveProperty.DistinctUntilChanged().Subscribe(x => hInfo.UpdateCurrentHeight((int)x));
            gameController.ComboReactiveProperty.DistinctUntilChanged().Subscribe(x => combo.UpdateCombo(x));
            gameController.PlayTimeReactiveProperty.DistinctUntilChanged().Subscribe(x => time.UpdatePlayTime(x));
            gameController.ScoreReactiveProperty.DistinctUntilChanged().Subscribe(x => score.UpdateScore(x));
            gameController.MoneyReactiveProperty.DistinctUntilChanged().Subscribe(x => money.UpdateMoney(x));

            // Player監視(ライフ・ボム数・魚やBlockの状態)
            player.LifeReactiveProperty.Subscribe(life => pLife.UpdateLife(life));
            player.BombReactiveProperty.Subscribe(stock => bButtonView.UpdateBombStock(stock));
            player.FishStateReactiveProperty.DistinctUntilChanged().Subscribe(state => OnThrowStatusChanged(state));
            player.BlockStateReactiveProperty.DistinctUntilChanged().Subscribe(state => OnBlockStatusChanged(state));

            // House監視(最大/現在ライフ)
            house.CurrentLifeReactiveProperty.Subscribe(life => hLife.UpdateCurrentLife(life));
            house.MaxLifeReactiveProperty.Subscribe(life => hLife.UpdateMaxLife(life));

            // LoadingView除去
            loadingView.RemoveLoadingPanel();

            return;
        }