Exemple #1
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 #2
0
        protected override bool Init()
        {
            UISortieShipCharacter uIShipCharacter = SortieMapTaskManager.GetUIShipCharacter();

            uIShipCharacter.SetShipData(SortieBattleTaskManager.GetMapManager().Deck.GetFlagShip());
            TutorialModel tutorial = SortieBattleTaskManager.GetMapManager().UserInfo.Tutorial;

            if (SortieBattleTaskManager.GetMapManager().UserInfo.StartMapCount >= 5)
            {
                SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(tutorial, TutorialGuideManager.TutorialID.BattleShortCutInfo, null, delegate
                {
                    _disShipMoveObserver = Observable.FromCoroutine((UniRx.IObserver <bool> observer) => ShipMove(observer)).Subscribe(delegate
                    {
                        SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.Event);
                    });
                });
            }
            else
            {
                _disShipMoveObserver = Observable.FromCoroutine((UniRx.IObserver <bool> observer) => ShipMove(observer)).Subscribe(delegate
                {
                    SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.Event);
                });
            }
            return(true);
        }
        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 #4
0
        private IEnumerator ChkUnderwayReplenishment(MapManager manager)
        {
            if (manager.GetMapSupplyInfo() != null)
            {
                ProdUnderwayReplenishment pur = ProdUnderwayReplenishment.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabProdUnderwayReplenishment).GetComponent <ProdUnderwayReplenishment>(), SortieMapTaskManager.GetSharedPlace(), manager.GetMapSupplyInfo());
                yield return(pur.Play().StartAsCoroutine());

                Mem.DelComponentSafe(ref pur);
                yield break;
            }
            MapManager            mm    = SortieBattleTaskManager.GetMapManager();
            UISortieShipCharacter uissc = SortieMapTaskManager.GetUIShipCharacter();

            if (uissc.isInDisplay)
            {
                uissc.SetShipData(mm.Deck.GetFlagShip());
                uissc.Show(null);
                yield return(Observable.Timer(TimeSpan.FromSeconds(2.0)).StartAsCoroutine());
            }
        }