protected override IEnumerator AnimationObserver(UniRx.IObserver <bool> observer)
        {
            UIMapManager          uimm  = SortieMapTaskManager.GetUIMapManager();
            UIAreaMapFrame        uiamf = SortieMapTaskManager.GetUIAreaMapFrame();
            UISortieShipCharacter uissc = SortieMapTaskManager.GetUIShipCharacter();
            bool isWait = true;

            uissc.SetInDisplayNextMove(isInDisplay: false);
            uiamf.SetMessage("艦隊の前方にうずしおが発生しました!");
            yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());

            uimm.nextCell.PlayMailstrom(uimm.sortieShip, _clsEventHappeningModel, delegate
            {
                base._003CisWait_003E__3 = false;
            });
            while (isWait)
            {
                yield return(null);
            }
            uiamf.SetMessage(string.Format((!_clsEventHappeningModel.Dentan) ? "{0}x{1}を\n落としてしまいました…。" : "{0}x{1}を\n落としてしまいました…。\n(電探が役立って、被害を抑えられた!)", SortieUtils.ConvertMatCategory2String(_clsEventHappeningModel.Material), _clsEventHappeningModel.Count));
            yield return(Observable.Timer(TimeSpan.FromSeconds(2.0)).StartAsCoroutine());

            uiamf.ClearMessage();
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Exemple #2
0
        //protected override IEnumerator AnimationObserver(IObserver<bool> observer)
        protected IEnumerator AnimationObserver(UniRx.IObserver <bool> observer)
        {
            MapManager            mm    = SortieBattleTaskManager.GetMapManager();
            UIMapManager          uimm  = SortieMapTaskManager.GetUIMapManager();
            UIAreaMapFrame        uiamf = SortieMapTaskManager.GetUIAreaMapFrame();
            UISortieShipCharacter uissc = SortieMapTaskManager.GetUIShipCharacter();
            bool   isShipWait           = true;
            bool   isItemGetWait        = true;
            string empty = string.Empty;
            string str   = (!_clsEventItemModel.IsMaterial()) ? $"{SortieUtils.ConvertItem2String(_clsEventItemModel.ItemID)}x{_clsEventItemModel.Count.ToString()}\nを入手しました!" : $"{SortieUtils.ConvertMatCategory2String(_clsEventItemModel.MaterialCategory)}x{_clsEventItemModel.Count.ToString()}\nを入手しました!";

            uiamf.SetMessage(str);
            yield return(null);

            uissc.SetShipData(GetTargetShip(mm.Deck));
            uissc.ShowInItemGet(delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisShipWait_003E__4 = false;
            });
            uissc.SetInDisplayNextMove(isInDisplay: false);
            uimm.sortieShip.PlayGetMaterialOrItem(_clsEventItemModel, delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003Cuiamf_003E__2.ClearMessage();
                // base._003CisItemGetWait_003E__5 = false;
            });
            while (isShipWait || isItemGetWait)
            {
                yield return(null);
            }
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Exemple #3
0
        private void OnDecideMapCell(UISortieMapCell cell)
        {
            _isInputPossible = false;
            _listUIMapCell.ForEach(delegate(System.Tuple <int, UISortieMapCell> x)
            {
                x.Item2.isActiveBranchingTarget = false;
            });
            UISortieShip sortieShip = SortieMapTaskManager.GetUIMapManager().sortieShip;

            sortieShip.HideInputIcon();
            UIAreaMapFrame uIAreaMapFrame = SortieMapTaskManager.GetUIAreaMapFrame();

            uIAreaMapFrame.ClearMessage();
            Dlg.Call(ref _actOnDecideMapCell, cell.cellModel.CellNo);
        }
Exemple #4
0
        private IEnumerator PlayStupid(UniRx.IObserver <bool> observer, enumMapWarType iWarType)
        {
            UIMapManager   uimm         = SortieMapTaskManager.GetUIMapManager();
            UIAreaMapFrame uiamf        = SortieMapTaskManager.GetUIAreaMapFrame();
            UIMapManager   uiMapManager = SortieMapTaskManager.GetUIMapManager();

            uimm.nextCell.PlayRipple(Color.red);
            uiMapManager.nextCell.SetPassedDefaultColor();
            yield return(SortieMapTaskManager.GetUIMapManager().sortieShip.PlayExclamationPoint().StartAsCoroutine());

            uiamf.SetMessage(enumMapEventType.Stupid, iWarType);
            yield return(new WaitForSeconds(1f));

            uimm.nextCell.StopRipple();
            uiMapManager.UpdateCellState(uiMapManager.nextCell.cellModel.CellNo, isPassed: true);
            uiamf.ClearMessage();
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
        protected override bool Init()
        {
            this._clsState = new StatementMachine();
            UIAreaMapFrame uIAreaMapFrame = SortieMapTaskManager.GetUIAreaMapFrame();

            uIAreaMapFrame.Hide().setOnComplete(delegate
            {
                this._uiBattleShutter = BattleShutter.Instantiate(SortieBattleTaskManager.GetSortieBattlePrefabFile().prefabUIBattleShutter.GetComponent <BattleShutter>(), SortieMapTaskManager.GetSharedPlace(), 20);
                this._uiBattleShutter.Init(BaseShutter.ShutterMode.Open);
                this._uiBattleShutter.ReqMode(BaseShutter.ShutterMode.Close, delegate
                {
                    ProdSortieEnd prodSortieEnd = ProdSortieEnd.Instantiate(SortieMapTaskManager.GetPrefabFile().prodSortieEnd.GetComponent <ProdSortieEnd>(), SortieMapTaskManager.GetSharedPlace());
                    prodSortieEnd.Play(delegate
                    {
                        this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitResult), new StatementMachine.StatementMachineUpdate(this.UpdateResult));
                    });
                });
            });
            return(true);
        }
Exemple #6
0
        private bool Init(List <CellModel> cells, Action <int> onDecide)
        {
            _nSelectIndex    = 0;
            _isInputPossible = false;
            UIAreaMapFrame uiamf = SortieMapTaskManager.GetUIAreaMapFrame();

            _listCellModel      = cells;
            _actOnDecideMapCell = onDecide;
            UISortieShip ship = SortieMapTaskManager.GetUIMapManager().sortieShip;

            ship.PlayBalloon(enumMapEventType.Stupid, enumMapWarType.Midnight, delegate
            {
                ship.ShowInputIcon();
                uiamf.SetMessage("艦隊の針路を選択できます。\n提督、どちらの針路を選択しますか?");
                ActiveTargetCell(cells);
                Observable.NextFrame(FrameCountType.EndOfFrame).Subscribe(delegate
                {
                    _isInputPossible = true;
                });
            });
            return(true);
        }
        protected override IEnumerator AnimationObserver(UniRx.IObserver <bool> observer)
        {
            UIMapManager   uimm  = SortieMapTaskManager.GetUIMapManager();
            UISortieShip   uiss  = uimm.sortieShip;
            UIAreaMapFrame uiamf = SortieMapTaskManager.GetUIAreaMapFrame();

            uiamf.SetMessage(_clsEventModel.AircraftType);
            Transform airRecPoint = null;

            if (uimm.airRecPoint.ContainsKey(uimm.nextCell.cellModel.CellNo))
            {
                airRecPoint = uimm.airRecPoint[uimm.nextCell.cellModel.CellNo];
            }
            bool isWait2 = true;

            uiss.PlayAirReconnaissance(_clsEventModel.AircraftType, uiss.transform, airRecPoint, delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWait_003E__4 = false;
            });
            while (isWait2)
            {
                yield return(null);
            }
            isWait2 = true;
            uiss.PlayBalloon(_clsEventModel, SortieBattleTaskManager.GetMapManager().GetItemEvent(), delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWait_003E__4 = false;
            });
            while (isWait2)
            {
                yield return(null);
            }
            uiamf.ClearMessage();
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Exemple #8
0
        private IEnumerator AnimationObserver(UniRx.IObserver <bool> observer)
        {
            if (isPlaying)
            {
                observer.OnNext(value: true);
                observer.OnCompleted();
                isPlaying = false;
            }
            isPlaying = true;
            panel.widgetsAreStatic = false;
            UIAreaMapFrame uiamf                = SortieMapTaskManager.GetUIAreaMapFrame();
            UISortieShip   uisp                 = SortieMapTaskManager.GetUIMapManager().sortieShip;
            bool           isWaitTimer2         = false;
            bool           isWaitVoiceFinished2 = false;
            bool           isWaitAnimation4     = false;

            uiamf.SetMessage("艦隊に洋上補給を行います。");
            yield return(new WaitForEndOfFrame());

            uisp.PlayBalloon(delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWaitAnimation_003E__4 = true;
            });
            while (!isWaitAnimation4)
            {
                yield return(null);
            }
            isWaitAnimation4 = false;
            LeanTween.delayedCall(1f, (Action) delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWaitTimer_003E__2 = true;
            });
            LeanTween.delayedCall(1f, (Action) delegate
            {
                throw new NotImplementedException("なにこれ");
                // ShipUtils.PlayShipVoice(this._listShipInfos[1].Item2, 26, delegate
                //{
                //	base._003CisWaitVoiceFinished_003E__3 = true;
                //});
            }).setOnStart(delegate
            {
                throw new NotImplementedException("なにこれ");
                //this._listShipInfos[1].Item1.transform.LTValue(this._listShipInfos[1].Item1.alpha, 1f, this._strParams.showTime).setEase(this._strParams.showEaseType).setOnUpdate(delegate(float x)
                //{
                //	this._listShipInfos[1].Item1.alpha = x;
                //})
                //	.setOnComplete((Action)delegate
                //	{
                //		base._003CisWaitAnimation_003E__4 = true;
                //	});
                //this._listShipInfos[1].Item1.transform.parent.LTMoveLocalX(this._strParams.showTargetShipPos.x, this._strParams.showTime).setEase(this._strParams.hideEaseType);
            });
            while (!isWaitTimer2 || !isWaitVoiceFinished2 || !isWaitAnimation4)
            {
                yield return(null);
            }
            isWaitTimer2         = false;
            isWaitVoiceFinished2 = false;
            isWaitAnimation4     = false;
            LeanTween.delayedCall(1f, (Action) delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWaitTimer_003E__2 = true;
            });
            LeanTween.delayedCall(0.5f, (Action) delegate
            {
                throw new NotImplementedException("なにこれ");
                // ShipUtils.PlayShipVoice(this._listShipInfos[0].Item2, 26, delegate
                //{
                //	base._003CisWaitVoiceFinished_003E__3 = true;
                //});
            }).setOnStart(delegate
            {
                throw new NotImplementedException("なにこれ");
                //this._listShipInfos[0].Item1.transform.LTValue(this._listShipInfos[0].Item1.alpha, 1f, this._strParams.showTime).setEase(this._strParams.showEaseType).setOnUpdate(delegate(float x)
                //{
                //	this._listShipInfos[0].Item1.alpha = x;
                //})
                //	.setOnComplete((Action)delegate
                //	{
                //		base._003CisWaitAnimation_003E__4 = true;
                //	});
                //this._listShipInfos[0].Item1.transform.parent.LTMoveLocalX(this._strParams.showFleetOilerPos.x, this._strParams.showTime).setEase(this._strParams.hideEaseType).setOnStart(delegate
                //{
                //	((Component)this._psFleetOilerMove).SetActive(isActive: true);
                //	this._psFleetOilerMove.Play();
                //});
            });
            while (!isWaitTimer2 || !isWaitVoiceFinished2 || !isWaitAnimation4)
            {
                yield return(null);
            }
            isWaitAnimation4 = false;
            ((Component)_psOilerTargetHeal).transform.LTMoveLocal(_strParams.endOilerTargetParticlePos, _strParams.oilerTargetParticleMoveTime).setDelay(0.5f).setOnStart(delegate
            {
                throw new NotImplementedException("なにこれ");
                // ((Component)this._psOilerTargetHeal).SetActive(isActive: true);
                // this._psOilerTargetHeal.Play();
            })
            .setOnComplete((Action) delegate
            {
                throw new NotImplementedException("なにこれ");
                // base._003CisWaitAnimation_003E__4 = true;
            });
            while (!isWaitAnimation4)
            {
                yield return(null);
            }
            yield return(new WaitForSeconds(0.5f));

            Hide(_listShipInfos[0], _strParams.hideFleetOilerPos);
            Hide(_listShipInfos[1], _strParams.hideTargetShipPos);
            yield return(new WaitForSeconds(0.5f));

            observer.OnNext(value: true);
            observer.OnCompleted();
            uiamf.ClearMessage();
            panel.widgetsAreStatic = true;
            isPlaying = false;
        }
Exemple #9
0
        private IEnumerator EventEnemy(enumMapEventType iEventType)
        {
            SortieBattleTaskManager.GetMapManager();
            UIMapManager   uimm  = SortieMapTaskManager.GetUIMapManager();
            UIAreaMapFrame uiamf = SortieMapTaskManager.GetUIAreaMapFrame();

            uimm.nextCell.PlayRipple(Color.red);
            yield return(SortieMapTaskManager.GetUIMapManager().sortieShip.PlayExclamationPoint().StartAsCoroutine());

            if (SortieMapTaskManager.GetShortCutSwitch().isShortCut&& SortieMapTaskManager.GetShortCutSwitch().isValid)
            {
                UIWobblingIcon uiwi2 = uimm.wobblingIcons.wobblingIcons[uimm.nextCell.cellModel.CellNo];
                if (uiwi2 != null)
                {
                    bool isWait2 = true;
                    uiwi2.Show().setOnComplete((Action) delegate
                    {
                        isWait2 = false;
                    });
                    while (!isWait2)
                    {
                        yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());
                    }
                    yield return(new WaitForSeconds(1.5f));
                }
                SortieBattleTaskManager.ReqMode(SortieBattleMode.BattleCut);
                SortieMapTaskManager.GetUIAreaMapFrame().Hide();
                uimm.nextCell.StopRipple();
                if (uiwi2 != null)
                {
                    uiwi2.Hide().setOnComplete((Action) delegate
                    {
                        UnityEngine.Object.Destroy(uiwi2.gameObject);
                    });
                }
                yield return(null);

                yield break;
            }
            UIWobblingIcon uiwi = uimm.wobblingIcons.wobblingIcons[uimm.nextCell.cellModel.CellNo];

            if (uiwi != null)
            {
                bool isWait = true;
                uiwi.Show().setOnComplete((Action) delegate
                {
                    throw new NotImplementedException("なにこれ");
                    // base._003CisWait_003E__6 = false;
                });
                while (!isWait)
                {
                    yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());
                }
                yield return(new WaitForSeconds(1.5f));
            }
            _isNormalBattle = true;
            uiamf.ClearMessage();
            uimm.nextCell.StopRipple();
            OnFinished();
            yield return(null);
        }