Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public static UISortieShip Instantiate(UISortieShip prefab, Transform parent, Direction iDirection)
        {
            UISortieShip uISortieShip = UnityEngine.Object.Instantiate(prefab);

            uISortieShip.transform.parent = parent;
            uISortieShip.transform.localPositionZero();
            uISortieShip.transform.localScaleOne();
            return(uISortieShip.VirtualCtor(iDirection));
        }
        public static UISortieShip Instantiate(UISortieShip prefab, Transform parent, UISortieShip.Direction iDirection)
        {
            UISortieShip uISortieShip = Object.Instantiate <UISortieShip>(prefab);

            uISortieShip.get_transform().set_parent(parent);
            uISortieShip.get_transform().localPositionZero();
            uISortieShip.get_transform().localScaleOne();
            return(uISortieShip.VirtualCtor(iDirection));
        }
Exemplo n.º 4
0
        private LTDescr PlayShipMoveAnim(UISortieShip sortieShip)
        {
            Vector3 originPos = sortieShip.get_transform().get_localPosition();
            float   rotCnt    = 3f;

            return(base.get_transform().LTValue(0f, rotCnt, 3f).setEase(LeanTweenType.easeOutQuad).setOnUpdate(delegate(float x)
            {
                float num = (x >= rotCnt / 2f) ? (30f * (rotCnt - x)) : (30f * x);
                Vector3 vector = new Vector2(num * Mathf.Sin(x % 1f * 3.14159274f * 2f), num * Mathf.Cos(x % 1f * 3.14159274f * 2f));
                sortieShip.get_transform().set_localPosition(vector + originPos);
            }));
        }
Exemplo n.º 5
0
        private LTDescr PlayShipMoveAnim(UISortieShip sortieShip)
        {
            Vector3 originPos = sortieShip.transform.localPosition;
            float   rotCnt    = 3f;

            return(base.transform.LTValue(0f, rotCnt, 3f).setEase(LeanTweenType.easeOutQuad).setOnUpdate(delegate(float x)
            {
                float num = (!(x < rotCnt / 2f)) ? (30f * (rotCnt - x)) : (30f * x);
                Vector3 a = new Vector2(num * Mathf.Sin(x % 1f * (float)Math.PI * 2f), num * Mathf.Cos(x % 1f * (float)Math.PI * 2f));
                sortieShip.transform.localPosition = a + originPos;
            }));
        }
Exemplo n.º 6
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();
            });
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
0
 public void PlayMailstrom(UISortieShip sortieShip, ProdShipRipple ripple, Action onFinished)
 {
     SoundUtils.PlaySE(SEFIleInfos.SE_033);
     this.PlayRotation();
     this.PlayShipMoveAnim(sortieShip).setOnComplete(delegate
     {
         sortieShip.PlayLostMaterial(this._clsEventHappeningModel, null);
     });
     ripple.Play(Color.get_white());
     this._actOnFinished = onFinished;
     Observable.Timer(TimeSpan.FromSeconds(4.5)).Subscribe(delegate(long _)
     {
         this.OnFinished(ripple);
     });
 }
Exemplo n.º 9
0
 private IEnumerator ChkComment(MapManager manager, UISortieShip ship)
 {
     if (manager.Comment != 0)
     {
         bool isFinished = false;
         ship.PlayBalloon(manager.Comment, delegate
         {
             isFinished = true;
         });
         while (!isFinished)
         {
             yield return(null);
         }
     }
 }
Exemplo n.º 10
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);
     }
 }
Exemplo n.º 11
0
 private bool Init(MapManager manager, UISortieShip sortieShip)
 {
     if (_traBackground == null)
     {
         _traBackground = base.transform.FindChild("Background");
     }
     if (rudder == null)
     {
         rudder = base.transform.FindChild("Rudder");
     }
     MakeCellList(manager);
     MakeRouteList();
     MakeAirRecPoint(manager);
     MakeWobblingIconList(manager);
     this.sortieShip = UISortieShip.Instantiate(sortieShip, base.transform, _iDirection);
     UpdatePassedRoutesStates(manager);
     UpdateNowNNextCell(manager.NowCell, manager.NextCell);
     SetShipPosition();
     return(true);
 }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
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();
        }
Exemplo n.º 15
0
        public static UIMapManager Instantiate(MapManager manager, UIMapManager prefab, Transform parent, UISortieShip sortieShip)
        {
            UIMapManager uIMapManager = (!(prefab != null)) ? Util.InstantiatePrefab($"SortieMap/AreaMap/Map{manager.Map.MstId}", parent.gameObject).GetComponent <UIMapManager>() : Object.Instantiate(prefab);

            uIMapManager.transform.parent = parent;
            uIMapManager.transform.localPositionZero();
            uIMapManager.transform.localScale = Vector3.one * 1.1f;
            uIMapManager.Init(manager, sortieShip);
            return(uIMapManager);
        }
Exemplo n.º 16
0
        public static UIMapManager Instantiate(MapManager manager, UIMapManager prefab, Transform parent, UISortieShip sortieShip)
        {
            UIMapManager uIMapManager = (!(prefab != null)) ? Util.InstantiatePrefab(string.Format("SortieMap/AreaMap/Map{0}", manager.Map.MstId), parent.get_gameObject(), false).GetComponent <UIMapManager>() : Object.Instantiate <UIMapManager>(prefab);

            uIMapManager.get_transform().set_parent(parent);
            uIMapManager.get_transform().localPositionZero();
            uIMapManager.get_transform().set_localScale(Vector3.get_one() * 1.1f);
            uIMapManager.Init(manager, sortieShip);
            return(uIMapManager);
        }
Exemplo n.º 17
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;
        }
Exemplo n.º 18
0
        private IEnumerator ChkProduction(MapManager manager, UIMapManager uiManager, UISortieShip ship)
        {
            MapProductionKind production = manager.Production;

            if (production == MapProductionKind.WaterPlane && uiManager.nowCell != null)
            {
                bool isFinished = false;
                ship.PlayDetectionAircraft(uiManager.nowCell, uiManager.nextCell, delegate
                {
                    isFinished = true;
                });
                while (!isFinished)
                {
                    yield return(null);
                }
            }
        }