Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        private void OnFormationSelected(BattleFormationKinds1 iFormation)
        {
            SortieMapTaskManager.GetUIShipCharacter().Hide(null);
            SortieMapTaskManager.GetUIAreaMapFrame().Hide();
            ProdSortieTransitionToBattle prodSortieTransitionToBattle = SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle;

            SortieBattleTaskManager.GetTransitionCamera().enabled = true;
            prodSortieTransitionToBattle.Play(delegate
            {
                Hashtable hashtable = new Hashtable();
                if (SortieBattleTaskManager.GetMapManager().GetType().Equals(typeof(RebellionMapManager)))
                {
                    hashtable.Add("rootType", Generics.BattleRootType.Rebellion);
                    hashtable.Add("rebellionMapManager", SortieBattleTaskManager.GetMapManager());
                }
                else
                {
                    hashtable.Add("rootType", Generics.BattleRootType.SortieMap);
                    hashtable.Add("sortieMapManager", SortieBattleTaskManager.GetMapManager());
                }
                hashtable.Add("formation", iFormation);
                RetentionData.SetData(hashtable);
                SortieBattleTaskManager.ReqMode(SortieBattleMode.Battle);
            });
        }
Ejemplo n.º 3
0
        public void PlayMailstrom(UISortieShip sortieShip, MapEventHappeningModel eventHappeningModel, Action onFinished)
        {
            ProdShipRipple component     = Util.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabProdShipRipple.gameObject, base.transform.gameObject).GetComponent <ProdShipRipple>();
            ProdMailstrom  prodMailstrom = ProdMailstrom.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabProdMaelstrom).GetComponent <ProdMailstrom>(), base.transform, eventHappeningModel);

            prodMailstrom.PlayMailstrom(sortieShip, component, onFinished);
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
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();
        }
 protected override bool Update()
 {
     if (this._uiBattleFormationSelector != null)
     {
         this._uiBattleFormationSelector.OnUpdatedKeyController();
     }
     return(SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.SortieMapTaskManagerMode_BEF || SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.Formation);
 }
 protected override bool Update()
 {
     if (this._clsState != null)
     {
         this._clsState.OnUpdate(Time.get_deltaTime());
     }
     return(SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.SortieMapTaskManagerMode_BEF || SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.Result);
 }
 private bool InitResult(object data)
 {
     this._ctrlSortieResult = CtrlSortieResult.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabCtrlSortieResult.GetComponent <CtrlSortieResult>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().Items, delegate
     {
         this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitReward), new StatementMachine.StatementMachineUpdate(this.UpdateReward));
     });
     return(false);
 }
Ejemplo n.º 9
0
 private bool InitResult(object data)
 {
     _ctrlSortieResult = CtrlSortieResult.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabCtrlSortieResult).GetComponent <CtrlSortieResult>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().Items, delegate
     {
         _clsState.AddState(InitReward, UpdateReward);
     });
     return(false);
 }
Ejemplo n.º 10
0
 protected override bool Update()
 {
     if (SortieMapTaskManager.GetMode() != SortieMapTaskManagerMode.SortieMapTaskManagerMode_BEF)
     {
         return((SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.SortieMapTaskManagerMode_ST) ? true : false);
     }
     return(true);
 }
Ejemplo n.º 11
0
        protected override bool Init()
        {
            this._clsEvents = new Events();
            SortieMapTaskManager.GetUIAreaMapFrame().ClearMessage();
            MapManager mapManager = SortieBattleTaskManager.GetMapManager();

            this._clsEvents.Play(mapManager.NextCategory, mapManager.NextEventType, new Action <bool>(this.OnEventFinished));
            return(true);
        }
Ejemplo n.º 12
0
 public void PlayRipple(Color color)
 {
     _prodRipple = Util.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabProdShipRipple.gameObject, base.transform.gameObject).GetComponent <ProdShipRipple>();
     _prodRipple.Play(color);
     SoundUtils.PlaySE(SEFIleInfos.SE_032);
     Observable.Timer(TimeSpan.FromSeconds(1.5)).Subscribe(delegate
     {
         SoundUtils.PlaySE(SEFIleInfos.SE_032);
     });
 }
Ejemplo n.º 13
0
 protected override bool Update()
 {
     if (_uiBattleFormationSelector != null)
     {
         _uiBattleFormationSelector.OnUpdatedKeyController();
     }
     if (SortieMapTaskManager.GetMode() != SortieMapTaskManagerMode.SortieMapTaskManagerMode_BEF)
     {
         return((SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.Formation) ? true : false);
     }
     return(true);
 }
Ejemplo n.º 14
0
 protected override bool Update()
 {
     if (_clsState != null)
     {
         _clsState.OnUpdate(Time.deltaTime);
     }
     if (SortieMapTaskManager.GetMode() != SortieMapTaskManagerMode.SortieMapTaskManagerMode_BEF)
     {
         return((SortieMapTaskManager.GetMode() == SortieMapTaskManagerMode.Result) ? true : false);
     }
     return(true);
 }
 private void ChkLinkCellAfterPassed()
 {
     if (this._clsCellModel.GetLinkNo().get_Count() != 0)
     {
         UIMapManager uimm = SortieMapTaskManager.GetUIMapManager();
         this._clsCellModel.GetLinkNo().ForEach(delegate(int x)
         {
             uimm.cells.get_Item(x).SetActive(false);
         });
         this._uiCell.depth++;
     }
 }
Ejemplo n.º 16
0
 private void ChkLinkCellAfterPassed()
 {
     if (_clsCellModel.GetLinkNo().Count != 0)
     {
         UIMapManager uimm = SortieMapTaskManager.GetUIMapManager();
         _clsCellModel.GetLinkNo().ForEach(delegate(int x)
         {
             uimm.cells[x].SetActive(isActive: false);
         });
         _uiCell.depth++;
     }
 }
Ejemplo n.º 17
0
        private void CheckNextBossCell(MapManager manager)
        {
            UIShortCutSwitch shortCutSwitch = SortieMapTaskManager.GetShortCutSwitch();

            if (manager.NextCategory != enumMapEventType.War_Boss)
            {
                shortCutSwitch.SetIsValid(isValid: true, isAnimation: true);
            }
            else
            {
                shortCutSwitch.SetIsValid(manager.Map.ClearedOnce ? true : false, isAnimation: true);
            }
        }
Ejemplo n.º 18
0
        private void ActiveTargetCell(List <CellModel> cells)
        {
            _listUIMapCell = new List <System.Tuple <int, UISortieMapCell> >();
            int cnt = 0;

            cells.ForEach(delegate(CellModel x)
            {
                UISortieMapCell uISortieMapCell         = SortieMapTaskManager.GetUIMapManager().cells[x.CellNo];
                uISortieMapCell.isActiveBranchingTarget = true;
                uISortieMapCell.SetOnDecideActiveBranchingTarget(cnt, OnActive, OnDecideMapCell);
                uISortieMapCell.isFocus2ActiveBranching = ((_nSelectIndex == cnt) ? true : false);
                _listUIMapCell.Add(new System.Tuple <int, UISortieMapCell>(cnt, uISortieMapCell));
                cnt++;
            });
        }
Ejemplo n.º 19
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);
        }
Ejemplo n.º 20
0
        private void ActiveTargetCell(List <CellModel> cells)
        {
            this._listUIMapCell = new List <Tuple <int, UISortieMapCell> >();
            int cnt = 0;

            cells.ForEach(delegate(CellModel x)
            {
                UISortieMapCell uISortieMapCell         = SortieMapTaskManager.GetUIMapManager().cells.get_Item(x.CellNo);
                uISortieMapCell.isActiveBranchingTarget = true;
                uISortieMapCell.SetOnDecideActiveBranchingTarget(cnt, new Action <int>(this.OnActive), new Action <UISortieMapCell>(this.OnDecideMapCell));
                uISortieMapCell.isFocus2ActiveBranching = (this._nSelectIndex == cnt);
                this._listUIMapCell.Add(new Tuple <int, UISortieMapCell>(cnt, uISortieMapCell));
                cnt++;
            });
        }
Ejemplo n.º 21
0
        private IEnumerator PlayPortBackEo(UniRx.IObserver <bool> observer)
        {
            SortieBattleTaskManager.GetMapManager();
            UISortieShip      uiss = SortieMapTaskManager.GetUIMapManager().sortieShip;
            MapEventItemModel meim = SortieBattleTaskManager.GetMapManager().GetItemEvent();

            yield return(new WaitForSeconds(1.5f));

            uiss.PlayBalloon(meim, delegate
            {
                throw new NotImplementedException("なにこれ");
                // base.observer.OnNext(value: true);
                // base.observer.OnCompleted();
            });
        }
Ejemplo n.º 22
0
 private IEnumerator ChkCompass(MapManager manager, UIMapManager uiManager, UISortieShip ship)
 {
     if (manager.hasCompass())
     {
         SortieMapTaskManager.GetUIAreaMapFrame().SetMessage("どこに進む?");
         UICompassManager uicm   = UICompassManager.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabUICompassManager).GetComponent <UICompassManager>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().CompassId, ship.transform, uiManager.nextCell.transform);
         bool             isWait = false;
         uicm.Play(delegate
         {
             isWait = true;
         });
         while (!isWait)
         {
             yield return(new WaitForEndOfFrame());
         }
         Mem.DelComponentSafe(ref uicm);
     }
 }
Ejemplo n.º 23
0
        private void OnEventFinished(bool isBattle)
        {
            if (isBattle)
            {
                SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.Formation);
                return;
            }
            MapManager mapManager = SortieBattleTaskManager.GetMapManager();

            if (!mapManager.IsNextFinal())
            {
                Dlg.Call(ref _actOnGoNext, ShipRecoveryType.None);
            }
            else
            {
                SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.Result);
            }
        }
Ejemplo n.º 24
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();
        }
Ejemplo n.º 25
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());
            }
        }
        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);
        }
        private void GoNext(ShipRecoveryType iRecoveryType)
        {
            MapManager mm = SortieBattleTaskManager.GetMapManager();

            if (mm.GetNextCellCandidate().get_Count() != 0)
            {
                SortieMapTaskManager.Instance._ctrlActiveBranching = new CtrlActiveBranching(mm.GetNextCellCandidate(), delegate(int x)
                {
                    mm.GoNext(iRecoveryType, x);
                    SortieMapTaskManager.Instance.UpdateUIMapManager();
                    SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.SortieMapTaskManagerMode_ST);
                    Mem.DelIDisposableSafe <CtrlActiveBranching>(ref SortieMapTaskManager.Instance._ctrlActiveBranching);
                });
            }
            else
            {
                mm.GoNext(iRecoveryType);
                SortieMapTaskManager.Instance.UpdateUIMapManager();
                SortieMapTaskManager.ReqMode(SortieMapTaskManagerMode.SortieMapTaskManagerMode_ST);
            }
        }
Ejemplo n.º 28
0
        private IEnumerator ShipMove(UniRx.IObserver <bool> observer)
        {
            MapManager   manager      = SortieBattleTaskManager.GetMapManager();
            UIMapManager uiMapManager = SortieMapTaskManager.GetUIMapManager();
            UISortieShip sortieShip   = uiMapManager.sortieShip;

            UniRx.IObservable <Unit> underwayReplenishmentUnit = Observable.FromCoroutine(() => this.ChkUnderwayReplenishment(manager));
            UniRx.IObservable <Unit> compassUnit    = Observable.FromCoroutine(() => this.ChkCompass(manager, uiMapManager, sortieShip));
            UniRx.IObservable <Unit> productionUnit = Observable.FromCoroutine(() => this.ChkProduction(manager, uiMapManager, sortieShip));
            UniRx.IObservable <Unit> synthesisUnit  = Observable.SelectMany(other: Observable.FromCoroutine(() => this.ChkComment(manager, sortieShip)), source: underwayReplenishmentUnit.SelectMany(compassUnit).SelectMany(productionUnit));
            yield return(synthesisUnit.StartAsCoroutine());

            CheckNextBossCell(manager);
            sortieShip.Move(uiMapManager.nextCell, delegate
            {
                uiMapManager.UpdateRouteState(uiMapManager.nextCell.cellModel.CellNo);
                observer.OnNext(value: true);
                observer.OnCompleted();
            });
            yield return(null);
        }
Ejemplo n.º 29
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);
        }
Ejemplo n.º 30
0
        protected override bool Init()
        {
            App.TimeScale(1f);
            UIShortCutSwitch shortCutSwitch = SortieMapTaskManager.GetShortCutSwitch();

            shortCutSwitch.Hide();
            SortieMapTaskManager.GetUIShipCharacter().ShowInFormation(50, null);
            BattleFormationKinds1[] formationArray = SortieUtils.GetFormationArray(SortieBattleTaskManager.GetMapManager().Deck);
            if (1 < formationArray.Length)
            {
                _uiBattleFormationSelector = Util.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabUIBattleFormationKindSelectManager.gameObject, SortieMapTaskManager.GetSharedPlace().gameObject).GetComponent <UIBattleFormationKindSelectManager>();
                SortieMapTaskManager.GetUIAreaMapFrame().SetMessage("陣形を選択してください。");
                _uiBattleFormationSelector.Initialize(GameObject.Find("SortieAreaCamera").GetComponent <Camera>(), formationArray);
                _uiBattleFormationSelector.SetOnUIBattleFormationKindSelectManagerAction(UIBattleFormationKindSelectManagerActionCallBack);
                _uiBattleFormationSelector.SetKeyController(SortieBattleTaskManager.GetKeyControl());
            }
            else
            {
                OnFormationSelected(BattleFormationKinds1.TanJuu);
            }
            return(true);
        }