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(); }
//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(); }
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++; } }
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++; } }
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++; }); }
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); }
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++; }); }
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(); }); }
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(); }
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); }
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(); }
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; }
public void Play(enumMapEventType iEventType, enumMapWarType iWarType, Action <bool> onFinished) { this._actOnFinished = onFinished; switch (iEventType) { case enumMapEventType.NOT_USE: this.OnFinished(); break; case enumMapEventType.None: this.OnFinished(); break; case enumMapEventType.ItemGet: { UIMapManager uIMapManager = SortieMapTaskManager.GetUIMapManager(); uIMapManager.UpdateCellState(uIMapManager.nextCell.cellModel.CellNo, true); MapEventItemModel itemEvent = SortieBattleTaskManager.GetMapManager().GetItemEvent(); EventItemGet eig = new EventItemGet(itemEvent); eig.PlayAnimation().Subscribe(delegate(bool _) { eig.Dispose(); Mem.Del <EventItemGet>(ref eig); this.OnFinished(); }); break; } case enumMapEventType.Uzushio: { UIMapManager uIMapManager2 = SortieMapTaskManager.GetUIMapManager(); uIMapManager2.UpdateCellState(uIMapManager2.nextCell.cellModel.CellNo, true); MapEventHappeningModel happeningEvent = SortieBattleTaskManager.GetMapManager().GetHappeningEvent(); EventMailstrom em = new EventMailstrom(happeningEvent); em.PlayAnimation().Subscribe(delegate(bool _) { em.Dispose(); Mem.Del <EventMailstrom>(ref em); this.OnFinished(); }); break; } case enumMapEventType.War_Normal: case enumMapEventType.War_Boss: { UIMapManager uIMapManager3 = SortieMapTaskManager.GetUIMapManager(); uIMapManager3.UpdateCellState(uIMapManager3.nextCell.cellModel.CellNo, true); Observable.FromCoroutine(() => this.EventEnemy(iEventType), false).Subscribe <Unit>(); break; } case enumMapEventType.Stupid: Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.PlayStupid(observer, iWarType)).Subscribe(delegate(bool _) { this.OnFinished(); }); break; case enumMapEventType.AirReconnaissance: { UIMapManager uIMapManager4 = SortieMapTaskManager.GetUIMapManager(); uIMapManager4.UpdateCellState(uIMapManager4.nextCell.cellModel.CellNo, true); MapEventAirReconnaissanceModel airReconnaissanceEvent = SortieBattleTaskManager.GetMapManager().GetAirReconnaissanceEvent(); EventAirReconnaissance ear = new EventAirReconnaissance(airReconnaissanceEvent); ear.PlayAnimation().Subscribe(delegate(bool _) { ear.Dispose(); Mem.Del <EventAirReconnaissance>(ref ear); this.OnFinished(); }); break; } case enumMapEventType.PortBackEo: { UIMapManager uIMapManager5 = SortieMapTaskManager.GetUIMapManager(); uIMapManager5.UpdateCellState(uIMapManager5.nextCell.cellModel.CellNo, true); Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.PlayPortBackEo(observer)).Subscribe(delegate(bool _) { this.OnFinished(); }); break; } } }
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); }
public void PlayAirReconnaissance(MapAirReconnaissanceKind iKind, Transform from, Transform airRecPoint, Action onFinished) { switch (iKind) { case MapAirReconnaissanceKind.Impossible: Observable.Timer(TimeSpan.FromSeconds(1.2000000476837158)).Subscribe(delegate { Dlg.Call(ref onFinished); }); break; case MapAirReconnaissanceKind.LargePlane: { ProdAircraftMove prodAircraftMove2 = ProdAircraftMove.Instantiate(((Component)_prefabEventAircraftMove).GetComponent <ProdAircraftMove>(), SortieMapTaskManager.GetUIMapManager().transform, panel.depth + 1); prodAircraftMove2.Move(from.position, airRecPoint.position, MapAirReconnaissanceKind.LargePlane, onFinished); break; } case MapAirReconnaissanceKind.WarterPlane: { ProdAircraftMove prodAircraftMove = ProdAircraftMove.Instantiate(((Component)_prefabEventAircraftMove).GetComponent <ProdAircraftMove>(), SortieMapTaskManager.GetUIMapManager().transform, panel.depth + 1); prodAircraftMove.Move(from.position, airRecPoint.position, MapAirReconnaissanceKind.WarterPlane, onFinished); break; } } }
public void PlayDetectionAircraft(UISortieMapCell fromCell, UISortieMapCell toCell, Action onFinished) { ProdAircraftMove prodAircraftMove = ProdAircraftMove.Instantiate(((Component)_prefabEventAircraftMove).GetComponent <ProdAircraftMove>(), SortieMapTaskManager.GetUIMapManager().transform, panel.depth + 1); prodAircraftMove.Move(fromCell.transform.position, toCell.transform.position, onFinished); }