public UniRx.IObservable <bool> Play() { ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetStandingPosition(StandingPositionType.CommandBuffer); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(isSplit: false); battleCameras.fieldDimCamera.maskAlpha = 0f; battleCameras.SwitchMainCamera(FleetType.Friend); BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0]; battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing); battleFieldCamera.pointOfGaze = Vector3.Lerp(BattleTaskManager.GetBattleField().dicFleetAnchor[FleetType.Friend].position, BattleTaskManager.GetBattleField().dicFleetAnchor[FleetType.Enemy].position, 0.8f); battleFieldCamera.vignetting.enabled = true; battleFieldCamera.glowEffect.enabled = true; battleShips.SetBollboardTarget(null); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>(); if (component != null) { component.alpha = 0f; } Observable.NextFrame().Subscribe(delegate { CalcInitLineRotation(); PlayLineAnimation(); }); return(Observable.FromCoroutine((UniRx.IObserver <bool> observer) => AnimationObserver(observer))); }
public override void Play(Action callback) { ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; cutInEffectCamera.isCulling = true; base.get_transform().set_localScale(Vector3.get_one()); this._actCallback = callback; base.GetComponent <UIPanel>().widgetsAreStatic = false; if (this._iList == ProdTorpedoCutIn.AnimationList.None) { this.onAnimationFinishedAfterDiscard(); return; } base.Play(this._iList, callback); if (this._iList == ProdTorpedoCutIn.AnimationList.ProdTorpedoCutIn || this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInFriend) { ShipUtils.PlayTorpedoVoice(this.getTorpedoCutInShip(this._clsRaigeki, true)); } else if (this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInEnemy) { } }
public IObservable <bool> Play() { ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetStandingPosition(StandingPositionType.CommandBuffer); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(false); battleCameras.fieldDimCamera.maskAlpha = 0f; battleCameras.SwitchMainCamera(FleetType.Friend); BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0); battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing); battleFieldCamera.pointOfGaze = Vector3.Lerp(BattleTaskManager.GetBattleField().dicFleetAnchor.get_Item(FleetType.Friend).get_position(), BattleTaskManager.GetBattleField().dicFleetAnchor.get_Item(FleetType.Enemy).get_position(), 0.8f); battleFieldCamera.vignetting.set_enabled(true); battleFieldCamera.glowEffect.set_enabled(true); battleShips.SetBollboardTarget(null); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>(); if (component != null) { component.alpha = 0f; } Observable.NextFrame(FrameCountType.Update).Subscribe(delegate(Unit _) { this.CalcInitLineRotation(); this.PlayLineAnimation(); }); return(Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.AnimationObserver(observer))); }
public IEnumerator PlayShowAnimation(Action onFinished) { UIBattleNavigation uibn = BattleTaskManager.GetPrefabFile().battleNavigation; uibn.SetNavigationInCommand(commandMode); _actOnFinished = onFinished; yield return(new WaitForSeconds(0.2f)); bool wait2 = false; FadeOutOverlay().setOnComplete((Action) delegate { wait2 = true; }); while (!wait2) { yield return(new WaitForEndOfFrame()); } ObserverActionQueue oaq = BattleTaskManager.GetObserverAction(); oaq.Executions(); wait2 = false; InitCommandBackground(); FadeInOverlay().setOnComplete((Action) delegate { wait2 = true; }); while (!wait2) { yield return(new WaitForEndOfFrame()); } _uiCommandUnitList.Show().setOnComplete((Action) delegate { TutorialModel tutorial = BattleTaskManager.GetBattleManager().UserInfo.Tutorial; SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(tutorial, TutorialGuideManager.TutorialID.BattleCommand, null, delegate { uibn.Show(); this._clsState.AddState(this.InitKeyMode, this.UpdateKeyMode); this._uiCommandBox.isColliderEnabled = true; this._uiCommandBox.ChkAllSurfaceSet(); this._uiCommandUnitList.isColliderEnabled = true; }); }); Observable.FromCoroutine(_uiCommandBox.PlayShowAnimation).Subscribe(); }
private void PlayHeavyDamage(DamagedStates status) { List <ShipModel_Defender> list = new List <ShipModel_Defender>(); list.AddRange(_queFriedShipModel.ToArray()); _queFriedShipModel.Clear(); ProdDamageCutIn.DamageCutInType damageCutInType = (status == DamagedStates.Taiha) ? ProdDamageCutIn.DamageCutInType.Heavy : ProdDamageCutIn.DamageCutInType.Moderate; ProdDamageCutIn prodDamageCutIn = BattleTaskManager.GetPrefabFile().prodDamageCutIn; prodDamageCutIn.SetShipData(list, damageCutInType); prodDamageCutIn.Play(damageCutInType, delegate { BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.UpdateDamageAll(_iBattlePhase); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); OnFinished(); }); }
private void PlaySinking() { if (_queFriedShipModel.Count != 0) { ProdSinking prodSinking = BattleTaskManager.GetPrefabFile().prodSinking; prodSinking.SetSinkingData(_queFriedShipModel.Dequeue()); prodSinking.Play(delegate { ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); Observable.NextFrame().Subscribe(delegate { PlaySinking(); }); }); } else { OnFinished(); } }
private void PlaySinking() { if (this._queFriedShipModel.get_Count() != 0) { ProdSinking prodSinking = BattleTaskManager.GetPrefabFile().prodSinking; prodSinking.SetSinkingData(this._queFriedShipModel.Dequeue()); prodSinking.Play(delegate { ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); Observable.NextFrame(FrameCountType.Update).Subscribe(delegate(Unit _) { this.PlaySinking(); }); }); } else { this.OnFinished(); } }
private void PlayCommand(BattleCommand iCommand) { switch (iCommand) { case BattleCommand.None: OnFinished(null); break; case BattleCommand.Sekkin: case BattleCommand.Raigeki: { ProdBufferClose pbc = (!base.transform.GetComponentInChildren <ProdBufferClose>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Sekkin), base.gameObject).GetComponent <ProdBufferClose>() : base.transform.GetComponentInChildren <ProdBufferClose>(); pbc.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pbc.gameObject); }); break; } case BattleCommand.Hougeki: { ProdBufferShelling pbh = (!base.transform.GetComponentInChildren <ProdBufferShelling>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Hougeki), base.gameObject).GetComponent <ProdBufferShelling>() : base.transform.GetComponentInChildren <ProdBufferShelling>(); pbh.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pbh.gameObject); }); break; } case BattleCommand.Taisen: { ProdBufferAntiSubmarine pbas = (!base.transform.GetComponentInChildren <ProdBufferAntiSubmarine>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Taisen), base.gameObject).GetComponent <ProdBufferAntiSubmarine>() : base.transform.GetComponentInChildren <ProdBufferAntiSubmarine>(); pbas.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pbas.gameObject); }); break; } case BattleCommand.Ridatu: case BattleCommand.Kaihi: { ProdBufferAvoidance pbad = (!base.transform.GetComponentInChildren <ProdBufferAvoidance>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Kaihi), base.gameObject).GetComponent <ProdBufferAvoidance>() : base.transform.GetComponentInChildren <ProdBufferAvoidance>(); pbad.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pbad.gameObject); }); break; } case BattleCommand.Kouku: { ProdBufferAviation pba = (!base.transform.GetComponentInChildren <ProdBufferAviation>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Kouku), base.gameObject).GetComponent <ProdBufferAviation>() : base.transform.GetComponentInChildren <ProdBufferAviation>(); pba.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pba.gameObject); }); break; } case BattleCommand.Totugeki: { ProdBufferAssault pba2 = (!base.transform.GetComponentInChildren <ProdBufferAssault>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Totugeki), base.gameObject).GetComponent <ProdBufferAssault>() : base.transform.GetComponentInChildren <ProdBufferAssault>(); pba2.Init(PlayLookAtLineAssult); pba2.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pba2.gameObject); }); break; } case BattleCommand.Tousha: { ProdBufferUnifiedFire pbuf = (!base.transform.GetComponentInChildren <ProdBufferUnifiedFire>()) ? Util.Instantiate(LoadBufferPrefab(BattleCommand.Tousha), base.gameObject).GetComponent <ProdBufferUnifiedFire>() : base.transform.GetComponentInChildren <ProdBufferUnifiedFire>(); pbuf.Init(PlayLookAtLine); pbuf.Play(PlayBufferEffect, CalcInitLineRotation, PlayLineAnimation, PlayNextFocusShipCircleAnimation, _nBufferCnt).Subscribe(delegate { OnFinished(pbuf.gameObject); }); break; } } ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); BattleTaskManager.GetTorpedoHpGauges().Hide(); }