private IEnumerator CreateAerialCombatCutIn(IObserver <bool> observer) { BattleCameras cams = BattleTaskManager.GetBattleCameras(); BattleCutInCamera inCam = BattleTaskManager.GetBattleCameras().cutInCamera; BattleCutInEffectCamera efCam = BattleTaskManager.GetBattleCameras().cutInEffectCamera; BattleShips _battleShips = BattleTaskManager.GetBattleShips(); _prodSupportAerialPhase1 = ProdSupportAerialPhase1.Instantiate(fShips: _battleShips.dicFriendBattleShips, eShips: _battleShips.dicEnemyBattleShips, prefab: Resources.Load <ProdSupportAerialPhase1>("Prefabs/Battle/Production/SupportingFire/ProdSupportAerialPhase1"), model: _clsAerial, parent: cams.cutInCamera.transform.parent); if (_clsAerial.GetPlanes(is_friend: true) != null && _clsAerial.GetPlanes(is_friend: false) != null) { inCam.isCulling = true; efCam.isCulling = true; } else if (_clsAerial.GetPlanes(is_friend: true) != null) { efCam.isCulling = false; } yield return(new WaitForEndOfFrame()); _prodSupportAerialPhase2 = ProdSupportAerialPhase2.Instantiate(Resources.Load <ProdSupportAerialPhase2>("Prefabs/Battle/Production/SupportingFire/ProdSupportAerialPhase2"), _clsAerial, inCam.transform); yield return(new WaitForEndOfFrame()); _prodSupportAerialPhase2.CreateHpGauge(FleetType.Enemy); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private bool InitMoveCameraTo2D(object data) { BattleFieldCamera cam = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0); BattleShips battleShips = BattleTaskManager.GetBattleShips(); ProdDetectionStartCutIn pdsc = ProdDetectionStartCutIn.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdDetectionStartCutIn.GetComponent <ProdDetectionStartCutIn>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform()); ShipModel_Battle detectionPrimaryShip = ShipUtils.GetDetectionPrimaryShip(this._clsSakuteki.planes_f, true); UIBattleShip uIBattleShip = (detectionPrimaryShip == null) ? battleShips.flagShipFriend : battleShips.dicFriendBattleShips.get_Item(detectionPrimaryShip.Index); Vector3 vector = Mathe.NormalizeDirection(uIBattleShip.pointOfGaze, Vector3.get_zero()) * 30f; Vector3 fixChasingCamera = new Vector3(uIBattleShip.pointOfGaze.x, uIBattleShip.pointOfGaze.y, uIBattleShip.pointOfGaze.z + vector.z); cam.pointOfGaze = uIBattleShip.pointOfGaze; cam.ReqViewMode(CameraActor.ViewMode.FixChasing); cam.SetFixChasingCamera(fixChasingCamera); Vector3 endCamPos = new Vector3(uIBattleShip.pointOfGaze.x, 50f, uIBattleShip.pointOfGaze.z + vector.z * 6f); Transform transform = uIBattleShip.get_transform(); Vector3 position = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Item(0).get_transform().get_position(); this._psDetectionRipple = Util.Instantiate(ParticleFile.Load(ParticleFileInfos.BattlePSDetectionRipple), null, false, false).GetComponent <ParticleSystem>(); this._psDetectionRipple.get_transform().set_parent(transform); this._psDetectionRipple.get_transform().set_position(new Vector3(position.x, position.y + 0.01f, position.z)); this._psDetectionRipple.Play(); pdsc.Play().Subscribe(delegate(bool _) { cam.get_transform().LTMove(endCamPos, 1.95f).setEase(LeanTweenType.easeInOutCubic); Mem.DelComponentSafe <ProdDetectionStartCutIn>(ref pdsc); }); return(false); }
public virtual void PlayAttack(HougekiModel model, int nCurrentShellingCnt, bool isNextAttack, bool isSkipAttack, Action callback) { if (model == null) { Dlg.Call(ref callback); } BattleTaskManager.GetTorpedoHpGauges().Hide(); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); this.hougekiModel = model; this._actOnFinished = callback; this._isNextAttack = isNextAttack; this._isSkipAttack = isSkipAttack; this.SetDirectionSubjects(this.hougekiModel); this._nCurrentAttackCnt = nCurrentShellingCnt; BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.ResetFleetAnchorPosition(); this.CorFleetAnchorDifPosition(); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(false); BattleShips battleShips2 = BattleTaskManager.GetBattleShips(); battleShips2.SetBollboardTarget(true, battleCameras.fieldCameras.get_Item(0).get_transform()); battleShips2.SetBollboardTarget(false, battleCameras.fieldCameras.get_Item(1).get_transform()); battleShips2.SetTorpedoSalvoWakeAngle(false); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>(); if (component != null) { component.alpha = 0f; } BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0); battleFieldCamera.clearFlags = 1; battleFieldCamera.cullingMask = BattleTaskManager.GetBattleCameras().GetDefaultLayers(); battleFieldCamera.eyePosition = this.CalcAttackerCamStartPos; battleCameras.SwitchMainCamera(FleetType.Friend); BattleFieldCamera battleFieldCamera2 = battleCameras.fieldCameras.get_Item(1); battleFieldCamera2.eyePosition = new Vector3(0f, 4f, 0f); battleFieldCamera2.eyeRotation = Quaternion.get_identity(); battleFieldCamera2.fieldOfView = 30f; this.SetFieldCamera(true, this.CalcCamPos(true, false), this._listBattleShips.get_Item(0).spPointOfGaze); this.SetDimCamera(true, battleFieldCamera.get_transform()); this.subjectShipLayerFmAnD = Generics.Layers.FocusDim; this.subjectStandingPosFmAnD = StandingPositionType.Advance; BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().localScaleZero(); this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitAttackerFocus), new StatementMachine.StatementMachineUpdate(this.UpdateAttackerFocus)); }
public virtual void PlayAttack(HougekiModel model, int nCurrentShellingCnt, bool isNextAttack, bool isSkipAttack, Action callback) { if (model == null) { Dlg.Call(ref callback); } BattleTaskManager.GetTorpedoHpGauges().Hide(); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); hougekiModel = model; _actOnFinished = callback; _isNextAttack = isNextAttack; _isSkipAttack = isSkipAttack; SetDirectionSubjects(hougekiModel); _nCurrentAttackCnt = nCurrentShellingCnt; BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.ResetFleetAnchorPosition(); CorFleetAnchorDifPosition(); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(isSplit: false); BattleShips battleShips2 = BattleTaskManager.GetBattleShips(); battleShips2.SetBollboardTarget(isFriend: true, battleCameras.fieldCameras[0].transform); battleShips2.SetBollboardTarget(isFriend: false, battleCameras.fieldCameras[1].transform); battleShips2.SetTorpedoSalvoWakeAngle(isSet: false); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>(); if (component != null) { component.alpha = 0f; } BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0]; battleFieldCamera.clearFlags = CameraClearFlags.Skybox; battleFieldCamera.cullingMask = BattleTaskManager.GetBattleCameras().GetDefaultLayers(); battleFieldCamera.eyePosition = CalcAttackerCamStartPos; battleCameras.SwitchMainCamera(FleetType.Friend); BattleFieldCamera battleFieldCamera2 = battleCameras.fieldCameras[1]; battleFieldCamera2.eyePosition = new Vector3(0f, 4f, 0f); battleFieldCamera2.eyeRotation = Quaternion.identity; battleFieldCamera2.fieldOfView = 30f; SetFieldCamera(isAttacker: true, CalcCamPos(isAttacker: true, isPointOfGaze: false), _listBattleShips[0].spPointOfGaze); SetDimCamera(isAttacker: true, battleFieldCamera.transform); subjectShipLayerFmAnD = Generics.Layers.FocusDim; subjectStandingPosFmAnD = StandingPositionType.Advance; BattleTaskManager.GetPrefabFile().circleHPGauge.transform.localScaleZero(); _clsState.AddState(InitAttackerFocus, UpdateAttackerFocus); }
private bool InitWithdrawalSelection(object data) { _prodWithdrawalDecisionSelection.Play(delegate { BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer(); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Executions(); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.ResetFleetAnchorPosition(); battleField.enemySeaLevel.SetActive(isActive: true); battleField.ReqTimeZone(KCV.Battle.Utils.TimeZone.Night, BattleTaskManager.GetSkyType()); battleField.AlterWaveDirection(FleetType.Friend, FleetType.Friend); battleField.AlterWaveDirection(FleetType.Enemy, FleetType.Enemy); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.RadarDeployment(isDeploy: false); battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.InitEnemyFieldCameraDefault(); battleCameras.SetVerticalSplitCameras(isSplit: false); if (!battleCameras.isSplit) { battleCameras.SetSplitCameras(isSplit: true); } battleCameras.ResetFieldCamSettings(FleetType.Friend); battleCameras.ResetFieldCamSettings(FleetType.Enemy); battleCameras.fieldDimCameraEnabled(isEnabled: false); BattleFieldCamera battleFieldCamera = BattleTaskManager.GetBattleCameras().fieldCameras[0]; battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix); battleFieldCamera.SetFixCamera(_dicSplitCameraPos[FleetType.Friend], _dicSplitCameraRot[FleetType.Friend]); battleFieldCamera.cullingMask = battleCameras.GetDefaultLayers(); battleFieldCamera = BattleTaskManager.GetBattleCameras().fieldCameras[1]; battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix); battleFieldCamera.SetFixCamera(_dicSplitCameraPos[FleetType.Enemy], _dicSplitCameraRot[FleetType.Enemy]); battleFieldCamera.cullingMask = battleCameras.GetEnemyCamSplitLayers(); BattleShips battleShips2 = BattleTaskManager.GetBattleShips(); battleShips2.SetBollboardTarget(isFriend: true, battleCameras.fieldCameras[0].transform); battleShips2.SetBollboardTarget(isFriend: false, battleCameras.fieldCameras[1].transform); battleShips2.SetTorpedoSalvoWakeAngle(isSet: false); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; cutInEffectCamera.isCulling = false; UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>(); if (component != null) { component.alpha = 0f; } BattleTaskManager.GetTorpedoHpGauges().SetDestroy(); }, OnDecideWithdrawalButton); return(false); }
private new void Start() { InitBattleData(); _clsSettingModel = new SettingModel(); _iPhase = (_iPhaseReq = BattlePhase.BattlePhase_BEF); _traStage = base.transform.FindChild("Stage"); _clsBattleShips = new BattleShips(); _clsBattleCameras = new BattleCameras(); _clsBattleHPGauges = new BattleHPGauges(); _clsBattleField = base.transform.GetComponentInChildren <BattleField>(); UICircleHPGauge circleHPGauge = _clsBattlePrefabFile.circleHPGauge; UIBattleNavigation battleNavigation = _clsBattlePrefabFile.battleNavigation; battleNavigation.panel.depth = 100; _clsTorpedoHpGauges = new TorpedoHpGauges(); _clsBattleShips.Init(GetBattleManager()); _clsBattleField.ReqTimeZone(GetStartTimeZone(GetBattleManager().WarType), GetSkyType()); KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)GetBattleManager().GetBgmId()); ProdSortieTransitionToBattle psttb = (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) ? SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle : ProdSortieTransitionToBattle.Instantiate(Resources.Load <ProdSortieTransitionToBattle>("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle"), _clsBattleCameras.cutInCamera.transform).QuickFadeInInit(); Observable.FromCoroutine((UniRx.IObserver <float> observer) => InitBattle(observer)).Subscribe(delegate(float x) { if (x == 1f) { _iPhase = (_iPhaseReq = BattlePhase.FleetAdvent); Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate { _clsBattleField.AlterWaveDirection(FleetType.Friend); psttb.Play(ProdSortieTransitionToBattle.AnimationName.ProdSortieTransitionToBattleFadeIn, delegate { if (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) { SortieBattleTaskManager.GetSortieBattlePrefabFile().DisposeProdSortieTransitionToBattle(); } else { UnityEngine.Object.Destroy(psttb.gameObject); } if (SortieBattleTaskManager.GetTransitionCamera() != null) { SortieBattleTaskManager.GetTransitionCamera().enabled = false; } Mem.Del(ref psttb); }); }); } }).AddTo(base.gameObject); }
protected virtual void SetDirectionSubjects(HougekiModel model) { BattleShips battleShips = BattleTaskManager.GetBattleShips(); this._listBattleShips.Add((!model.Attacker.IsFriend()) ? battleShips.dicEnemyBattleShips.get_Item(model.Attacker.Index) : battleShips.dicFriendBattleShips.get_Item(model.Attacker.Index)); if (this.isProtect) { this._listBattleShips.Add((!model.Defender.IsFriend()) ? battleShips.flagShipEnemy : battleShips.flagShipFriend); this._listBattleShips.Add((!model.Defender.IsFriend()) ? battleShips.dicEnemyBattleShips.get_Item(model.Defender.Index) : battleShips.dicFriendBattleShips.get_Item(model.Defender.Index)); } else { this._listBattleShips.Add((!model.Defender.IsFriend()) ? battleShips.dicEnemyBattleShips.get_Item(model.Defender.Index) : battleShips.dicFriendBattleShips.get_Item(model.Defender.Index)); } this.subjectStandingPosFmAnD = StandingPositionType.Advance; }
private void SetEnemyShipsDrawType(ProdDetectionResultCutIn.AnimationList iList) { BattleShips battleShips = BattleTaskManager.GetBattleShips(); switch (iList) { case ProdDetectionResultCutIn.AnimationList.DetectionLost: case ProdDetectionResultCutIn.AnimationList.DetectionNotFound: battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Silhouette); break; case ProdDetectionResultCutIn.AnimationList.DetectionSucces: battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal); break; } }
private bool _initSupportFleetAdmission(object data) { BattleTaskManager.GetBattleField().ResetFleetAnchorPosition(); BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer(); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.RadarDeployment(isDeploy: false); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal); Observable.FromCoroutine((IObserver <bool> observer) => CreateCutIn(observer)).Subscribe(delegate { _prodSupportCutIn.Play(delegate { _onSupportFleetAdmissionFinished(); }); }); return(false); }
public virtual IObservable <bool> Play(Action onPlayBufferEffect, Action onCalcInitLineRotation, Action onPlayLineAnimation, Action onNextFocusShipAnimation, int nBufferCnt) { this._nBufferCnt = Mathe.MinMax2(nBufferCnt, 0, 4); this._clsCameraBezier = new Bezier(Bezier.BezierType.Quadratic, this._vStartCameraPivot, this._listEndCameraPivot.get_Item(this._nBufferCnt), this._vMidCameraPivot, Vector3.get_zero()); this._clsFleetBezier = new Bezier(Bezier.BezierType.Quadratic, this._vStartFleetPivot, this._vEndFleetPivot, this._vMidFleetPivot, Vector3.get_zero()); BattleField battleField = BattleTaskManager.GetBattleField(); this._traFleetAnchorFriend = battleField.dicFleetAnchor.get_Item(FleetType.Friend); this._traFleetAnchorEnemy = battleField.dicFleetAnchor.get_Item(FleetType.Enemy); this._traFleetAnchorEnemy.get_transform().set_localScale(Vector3.get_one() * 0.8f); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(false); battleCameras.fieldDimCamera.maskAlpha = 0f; battleCameras.SwitchMainCamera(FleetType.Enemy); BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(1); battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing); battleFieldCamera.eyePosition = this._clsCameraBezier.Interpolate(0f); battleFieldCamera.pointOfGaze = Vector3.Lerp(this._clsFleetBezier.Interpolate(0f), this._listEnemyFleetPivot.get_Item(this._nBufferCnt), 0.5f); battleFieldCamera.get_transform().LookAt(battleFieldCamera.pointOfGaze); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetBollboardTarget(battleFieldCamera.get_transform()); 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; } this._actOnPlayBufferEffect = onPlayBufferEffect; this._actOnNextFocusShipAnimation = onNextFocusShipAnimation; Observable.NextFrame(FrameCountType.Update).Subscribe(delegate(Unit x) { Dlg.Call(ref onCalcInitLineRotation); Dlg.Call(ref onPlayLineAnimation); }); return(Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.AnimationObserver(observer))); }
public virtual UniRx.IObservable <bool> Play(Action onPlayBufferEffect, Action onCalcInitLineRotation, Action onPlayLineAnimation, Action onNextFocusShipAnimation, int nBufferCnt) { _nBufferCnt = Mathe.MinMax2(nBufferCnt, 0, 4); _clsCameraBezier = new Bezier(Bezier.BezierType.Quadratic, _vStartCameraPivot, _listEndCameraPivot[_nBufferCnt], _vMidCameraPivot, Vector3.zero); _clsFleetBezier = new Bezier(Bezier.BezierType.Quadratic, _vStartFleetPivot, _vEndFleetPivot, _vMidFleetPivot, Vector3.zero); BattleField battleField = BattleTaskManager.GetBattleField(); _traFleetAnchorFriend = battleField.dicFleetAnchor[FleetType.Friend]; _traFleetAnchorEnemy = battleField.dicFleetAnchor[FleetType.Enemy]; _traFleetAnchorEnemy.transform.localScale = Vector3.one * 0.8f; BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SetVerticalSplitCameras(isSplit: false); battleCameras.fieldDimCamera.maskAlpha = 0f; battleCameras.SwitchMainCamera(FleetType.Enemy); BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[1]; battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing); battleFieldCamera.eyePosition = _clsCameraBezier.Interpolate(0f); battleFieldCamera.pointOfGaze = Vector3.Lerp(_clsFleetBezier.Interpolate(0f), _listEnemyFleetPivot[_nBufferCnt], 0.5f); battleFieldCamera.transform.LookAt(battleFieldCamera.pointOfGaze); BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetBollboardTarget(battleFieldCamera.transform); 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; } _actOnPlayBufferEffect = onPlayBufferEffect; _actOnNextFocusShipAnimation = onNextFocusShipAnimation; Observable.NextFrame().Subscribe(delegate { Dlg.Call(ref onCalcInitLineRotation); Dlg.Call(ref onPlayLineAnimation); }); return(Observable.FromCoroutine((UniRx.IObserver <bool> observer) => AnimationObserver(observer))); }
private bool InitMoveCameraTo2D(object data) { BattleFieldCamera cam = BattleTaskManager.GetBattleCameras().fieldCameras[0]; BattleShips battleShips = BattleTaskManager.GetBattleShips(); ProdDetectionStartCutIn pdsc = ProdDetectionStartCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionStartCutIn).GetComponent <ProdDetectionStartCutIn>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform); ShipModel_Battle detectionPrimaryShip = ShipUtils.GetDetectionPrimaryShip(_clsSakuteki.planes_f, isFriend: true); UIBattleShip uIBattleShip = (detectionPrimaryShip == null) ? battleShips.flagShipFriend : battleShips.dicFriendBattleShips[detectionPrimaryShip.Index]; Vector3 vector = Mathe.NormalizeDirection(uIBattleShip.pointOfGaze, Vector3.zero) * 30f; Vector3 pointOfGaze = uIBattleShip.pointOfGaze; float x = pointOfGaze.x; Vector3 pointOfGaze2 = uIBattleShip.pointOfGaze; float y = pointOfGaze2.y; Vector3 pointOfGaze3 = uIBattleShip.pointOfGaze; Vector3 fixChasingCamera = new Vector3(x, y, pointOfGaze3.z + vector.z); cam.pointOfGaze = uIBattleShip.pointOfGaze; cam.ReqViewMode(CameraActor.ViewMode.FixChasing); cam.SetFixChasingCamera(fixChasingCamera); Vector3 pointOfGaze4 = uIBattleShip.pointOfGaze; float x2 = pointOfGaze4.x; Vector3 pointOfGaze5 = uIBattleShip.pointOfGaze; Vector3 endCamPos = new Vector3(x2, 50f, pointOfGaze5.z + vector.z * 6f); Transform transform = uIBattleShip.transform; Vector3 position = BattleTaskManager.GetBattleShips().dicFriendBattleShips[0].transform.position; _psDetectionRipple = Util.Instantiate(ParticleFile.Load(ParticleFileInfos.BattlePSDetectionRipple)).GetComponent <ParticleSystem>(); ((Component)_psDetectionRipple).transform.parent = transform; ((Component)_psDetectionRipple).transform.position = new Vector3(position.x, position.y + 0.01f, position.z); _psDetectionRipple.Play(); pdsc.Play().Subscribe(delegate { cam.transform.LTMove(endCamPos, 1.95f).setEase(LeanTweenType.easeInOutCubic); Mem.DelComponentSafe(ref pdsc); }); return(false); }