public BattleCameras() { _camCutInCamera = GameObject.Find("UIRoot/CutInCamera").GetComponent <BattleCutInCamera>(); _camCutInCamera.cullingMask = (Generics.Layers.UI2D | Generics.Layers.CutIn); _camCutInCamera.depth = 6f; _camCutInCamera.clearFlags = CameraClearFlags.Depth; _camCutInEffectCamera = GameObject.Find("UIRoot/CutInEffectCamera").GetComponent <BattleCutInEffectCamera>(); _camCutInEffectCamera.cullingMask = Generics.Layers.CutIn; _camCutInEffectCamera.isCulling = false; _camCutInEffectCamera.depth = 5f; _camCutInEffectCamera.clearFlags = CameraClearFlags.Depth; _listCameras = new List <BattleFieldCamera>(); foreach (int value in Enum.GetValues(typeof(FleetType))) { if (value != 2) { BattleFieldCamera item = (!GameObject.Find($"Stage/{(FleetType)value}FieldCamera")) ? null : GameObject.Find($"Stage/{(FleetType)value}FieldCamera").GetComponent <BattleFieldCamera>(); _listCameras.Add(item); if (_listCameras[value] != null) { _listCameras[value].cullingMask = GetDefaultLayers(); _listCameras[value].ResetMotionBlur(); _listCameras[value].depth = 0f; } } } _camFieldDimCamera = BattleFieldDimCamera.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabFieldDimCamera).GetComponent <BattleFieldDimCamera>(), BattleTaskManager.GetStage()); _camFieldDimCamera.syncTarget = _listCameras[0].transform; _camFieldDimCamera.cullingMask = GetDefaultDimLayers(); _camFieldDimCamera.isCulling = false; _camFieldDimCamera.depth = -1f; }
private IEnumerator createStrategyPoint(IObserver <bool> observer) { _prodMapPoint = ProdMapPoint.Instantiate(Resources.Load <ProdMapPoint>("Prefabs/Battle/Production/MapOpen/ProdMapOpenPoint"), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsResultModel.SPoint); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private bool _updateChkNextCell(object data) { if (!_clsMapManager.IsNextFinal()) { if (BattleTaskManager.GetRootType() == Generics.BattleRootType.Rebellion && BattleTaskManager.GetBattleManager().ChangeableDeck&& BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverYouin() && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverMegami()) { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal); return(true); } if (BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !ShipUtils.HasRepair(_clsResultModel.Ships_f[0])) { BattleTaskManager.ReqPhase(BattlePhase.FlagshipWreck); return(true); } BattleTaskManager.ReqPhase(BattlePhase.EscortShipEvacuation); return(true); } if (SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { RetentionData.SetData(BattleUtils.GetRetentionDataMapOpen(SortieBattleTaskManager.GetMapManager(), _clsResultModel)); SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } return(true); }
private bool _initThalassocracyProd(object data) { Observable.FromCoroutine((IObserver <bool> observer) => CreateThalassocracy(observer)).Subscribe(delegate { _prodThalassocracy.Play(_onThalassocracyProdFinished, BattleTaskManager.GetRootType(), BattleTaskManager.GetBattleManager().AreaName); }); return(false); }
private IEnumerator createMapClear(IObserver <bool> observer) { _prodMapClear = ProdMapClear.Instantiate(PrefabFile.Load <ProdMapClear>(PrefabFileInfos.MapClear), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsInput, BattleTaskManager.GetBattleManager().Ships_f[0], 120); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
protected override bool Init() { _isNightCombat = BattleTaskManager.GetBattleManager().HasNightBattle(); if (!_isNightCombat) { EndPhase(BattlePhase.Result); return(true); } _clsState = new StatementMachine(); float num = 72f; _dicSplitCameraPos = new Dictionary <FleetType, Vector3>(); _dicSplitCameraPos.Add(FleetType.Friend, new Vector3(0f, 4f, num)); _dicSplitCameraPos.Add(FleetType.Enemy, new Vector3(0f, 4f, 0f - num)); _dicSplitCameraRot = new Dictionary <FleetType, Quaternion>(); _dicSplitCameraRot.Add(FleetType.Friend, Quaternion.Euler(Vector3.zero)); _dicSplitCameraRot.Add(FleetType.Enemy, Quaternion.Euler(Vector3.up * 180f)); _prodWithdrawalDecisionSelection = ProdWithdrawalDecisionSelection.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdWithdrawalDecisionSelection).GetComponent <ProdWithdrawalDecisionSelection>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform); _clsState.AddState(InitWithdrawalSelection, UpdateWithdrawalSelection); return(true); }
protected override bool Init() { if (!BattleTaskManager.GetBattleManager().IsExistHougekiPhase_Day()) { ImmediateTermination(); EndPhase(BattleUtils.NextPhase(BattlePhase.Shelling)); } else { _listCmdActionList = BattleTaskManager.GetBattleManager().GetHougekiData_Day(); _nCurrentShellingCnt = 0; _actOnFleetAction = null; _prodShellingFormationJudge = ProdShellingFormationJudge.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdShellingFormationJudge).GetComponent <ProdShellingFormationJudge>(), BattleTaskManager.GetBattleManager(), BattleTaskManager.GetBattleCameras().cutInCamera.transform); _prodShellingAttack = new ProdShellingAttack(); _clsState = new StatementMachine(); _clsState.AddState(InitFormationJudge, UpdateFormationJudge); } return(true); }
private void OnNightMessageFinished() { BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera; SlotitemModel_Battle touchPlane = _clsNightCombat.GetTouchPlane(is_friend: true); SlotitemModel_Battle touchPlane2 = _clsNightCombat.GetTouchPlane(is_friend: false); _prodAerialTouchPlane = ((!(cutInCamera.transform.GetComponentInChildren <ProdAerialTouchPlane>() != null)) ? ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cutInCamera.transform) : cutInCamera.transform.GetComponentInChildren <ProdAerialTouchPlane>()); _prodAerialTouchPlane.transform.localPosition = Vector3.zero; _prodAerialTouchPlane.Init(touchPlane, touchPlane2); if (_clsNightCombat.GetRationData() != null) { ProdCombatRation pcr = ProdCombatRation.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdCombatRation).GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsNightCombat.GetRationData()); pcr.SetOnStageReady(delegate { if (_prodNightRadarDeployment != null) { _prodNightRadarDeployment.RadarObjectConvergence(); } Mem.DelComponentSafe(ref _prodNightRadarDeployment); }).Play(delegate { _clsState.AddState(InitSearchNFlare, UpdateSearchNFlare); }); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Register(delegate { Mem.DelComponentSafe(ref pcr); }); } else { _clsState.AddState(InitSearchNFlare, UpdateSearchNFlare); } }
private IEnumerator CreateBattleShips(ShipModel_BattleAll[] ships, BattleFormationKinds1 iKind, GameObject parent, Dictionary <int, UIBattleShip> dic, FleetType iType, int fleetNum, int combineNum) { BattleFieldCamera cam = BattleTaskManager.GetBattleCameras().fieldCameras[0]; Vector3[] formationPos = BattleDefines.FORMATION_POSITION[iKind][fleetNum]; Vector3[] oneRowPos = BattleDefines.FORMATION_POSITION[BattleFormationKinds1.TanOu][fleetNum]; int index = 0; foreach (ShipModel_BattleAll model in ships) { if (model == null) { continue; } UIBattleShip ship; if (_traFriendFleetAnchor.transform.FindChild(string.Format("{1}FleetAnchor/BattleShip{0}", index + 1, iType)) != null) { ship = ((Component)_traFriendFleetAnchor.transform.FindChild(string.Format("{1}FleetAnchor/BattleShip{0}", index + 1, iType))).GetComponent <UIBattleShip>(); } else { ship = UIBattleShip.Instantiate(_uiOriginalShip.GetComponent <UIBattleShip>(), parent.transform); ship.name = $"BattleShip{model.Index}"; Vector3 pos; Vector3 lPos; Vector3 commandBufferPos; Vector3 advancePos; if (index < formationPos.Length) { pos = ((iType != 0) ? (-formationPos[index] * 1f) : (formationPos[index] * 1f)); lPos = oneRowPos[index] * 1f; commandBufferPos = ((iType != 0) ? (-formationPos[index] * 4f) : (formationPos[index] * 4f)); advancePos = ((iType != 0) ? (lPos + Vector3.forward * 5f) : (lPos + Vector3.back * 5f)); } else { pos = Vector3.zero; lPos = Vector3.zero; commandBufferPos = Vector3.zero; advancePos = Vector3.zero; } ship.transform.localPosition = lPos; ship.dicStandingPos[StandingPositionType.Formation] = pos; ship.dicStandingPos[StandingPositionType.OneRow] = lPos; ship.dicStandingPos[StandingPositionType.CommandBuffer] = commandBufferPos; ship.dicStandingPos[StandingPositionType.Advance] = advancePos; ship.billboard.billboardTarget = cam.transform; ship.billboard.isBillboard = true; ship.billboard.isEnableVerticalRotation = false; ship.drawType = ShipDrawType.Normal; } dic.Add(index, ship); dic[index].SetShipInfos(model, isStart: true); if (model.IsEscape()) { dic[index].SetActive(isActive: false); } index++; yield return(null); } yield return(null); }
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); }
private bool InitNightMessage(object data) { _prodNightRadarDeployment = ProdNightRadarDeployment.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdNightRadarDeployment).GetComponent <ProdNightRadarDeployment>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform); _prodNightRadarDeployment.Play().Subscribe(delegate { OnNightMessageFinished(); }); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.isEnemySeaLevelActive = false; ShipModel_Battle model = BattleTaskManager.GetBattleManager().Ships_f[0]; KCV.Battle.Utils.ShipUtils.PlayStartNightCombatVoice(model); return(false); }
private void OnNightMessageFinished() { BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera; SlotitemModel_Battle touchPlane = this._clsNightCombat.GetTouchPlane(true); SlotitemModel_Battle touchPlane2 = this._clsNightCombat.GetTouchPlane(false); this._prodAerialTouchPlane = ((!(cutInCamera.get_transform().GetComponentInChildren <ProdAerialTouchPlane>() != null)) ? ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cutInCamera.get_transform()) : cutInCamera.get_transform().GetComponentInChildren <ProdAerialTouchPlane>()); this._prodAerialTouchPlane.get_transform().set_localPosition(Vector3.get_zero()); this._prodAerialTouchPlane.Init(touchPlane, touchPlane2); if (this._clsNightCombat.GetRationData() != null) { ProdCombatRation pcr = ProdCombatRation.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdCombatRation.GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), this._clsNightCombat.GetRationData()); pcr.SetOnStageReady(delegate { if (this._prodNightRadarDeployment != null) { this._prodNightRadarDeployment.RadarObjectConvergence(); } Mem.DelComponentSafe <ProdNightRadarDeployment>(ref this._prodNightRadarDeployment); }).Play(delegate { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitSearchNFlare), new StatementMachine.StatementMachineUpdate(this.UpdateSearchNFlare)); }); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Register(delegate { Mem.DelComponentSafe <ProdCombatRation>(ref pcr); }); } else { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitSearchNFlare), new StatementMachine.StatementMachineUpdate(this.UpdateSearchNFlare)); } }
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); }
protected override bool Init() { _clsSakuteki = BattleTaskManager.GetBattleManager().GetSakutekiData(); if (_clsSakuteki == null || !BattleTaskManager.GetBattleManager().IsExistSakutekiData()) { ImmediateTermination(); EndPhase(BattleUtils.NextPhase(BattlePhase.Detection)); return(true); } _clsState = new StatementMachine(); _clsState.AddState(InitMoveCameraTo2D, UpdateMoveCameraTo2D); Transform transform = BattleTaskManager.GetBattleCameras().cutInCamera.transform; _prodDetectionCutIn = ProdDetectionCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionCutIn).GetComponent <ProdDetectionCutIn>(), transform, _clsSakuteki); _prodDetectionResultCutIn = ProdDetectionResultCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionResultCutIn).GetComponent <ProdDetectionResultCutIn>(), transform, _clsSakuteki); _iResult = _prodDetectionResultCutIn.detectionResult; return(true); }
public static ParticleSystem InstantiateParticle(ref ParticleSystem system, ref Transform prefab) { return(BattleParticleFile.InstantiateParticle(ref system, ref prefab, BattleTaskManager.GetBattleField().get_transform())); }
public BattleShips() { _uiOriginalShip = ((Component)BattleTaskManager.GetPrefabFile().prefabBattleShip).GetComponent <UIBattleShip>(); _isInitialize = false; _isMakeRadar = false; }
private IEnumerator CreateFlagshipWreck(IObserver <bool> observer) { _prodFlagshipWreck = ProdFlagshipWreck.Instantiate(parent: BattleTaskManager.GetBattleCameras().cutInCamera.transform, prefab: ((Component)BattleTaskManager.GetPrefabFile().prefabProdFlagshipWreck).GetComponent <ProdFlagshipWreck>(), flagShip: BattleTaskManager.GetBattleManager().Ships_f[0], deck: SortieBattleTaskManager.GetMapManager().Deck, input: BattleTaskManager.GetKeyControl(), isBattleCut: false); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private void Start() { this.InitBattleData(); BattleTaskManager._clsSettingModel = new SettingModel(); BattleTaskManager._iPhase = (BattleTaskManager._iPhaseReq = BattlePhase.BattlePhase_BEF); BattleTaskManager._traStage = base.get_transform().FindChild("Stage"); BattleTaskManager._clsBattleShips = new BattleShips(); BattleTaskManager._clsBattleCameras = new BattleCameras(); BattleTaskManager._clsBattleHPGauges = new BattleHPGauges(); BattleTaskManager._clsBattleField = base.get_transform().GetComponentInChildren <BattleField>(); UICircleHPGauge circleHPGauge = this._clsBattlePrefabFile.circleHPGauge; UIBattleNavigation battleNavigation = this._clsBattlePrefabFile.battleNavigation; battleNavigation.panel.depth = 100; BattleTaskManager._clsTorpedoHpGauges = new TorpedoHpGauges(); BattleTaskManager._clsBattleShips.Init(BattleTaskManager.GetBattleManager()); BattleTaskManager._clsBattleField.ReqTimeZone(this.GetStartTimeZone(BattleTaskManager.GetBattleManager().WarType), BattleTaskManager.GetSkyType()); KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)BattleTaskManager.GetBattleManager().GetBgmId()); ProdSortieTransitionToBattle psttb = (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) ? SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle : ProdSortieTransitionToBattle.Instantiate(Resources.Load <ProdSortieTransitionToBattle>("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle"), BattleTaskManager._clsBattleCameras.cutInCamera.get_transform()).QuickFadeInInit(); Observable.FromCoroutine <float>((IObserver <float> observer) => this.InitBattle(observer)).Subscribe(delegate(float x) { if (x == 1f) { BattleTaskManager._iPhase = (BattleTaskManager._iPhaseReq = BattlePhase.FleetAdvent); Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { BattleTaskManager._clsBattleField.AlterWaveDirection(FleetType.Friend); psttb.Play(ProdSortieTransitionToBattle.AnimationName.ProdSortieTransitionToBattleFadeIn, delegate { if (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) { SortieBattleTaskManager.GetSortieBattlePrefabFile().DisposeProdSortieTransitionToBattle(); } else { Object.Destroy(psttb.get_gameObject()); } if (SortieBattleTaskManager.GetTransitionCamera() != null) { SortieBattleTaskManager.GetTransitionCamera().set_enabled(false); } Mem.Del <ProdSortieTransitionToBattle>(ref psttb); }); }); } }).AddTo(base.get_gameObject()); }
private bool InitCommandBuffer(object data) { if (_nCurrentShellingCnt == _listCmdActionList.Count) { OnShellingPhaseFinished(); return(false); } _isFriendActionExit = false; _isEnemyActionExit = false; EffectModel effectModel = BattleTaskManager.GetBattleManager().GetEffectData(_nCurrentShellingCnt); if (effectModel != null) { BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer = ProdBattleCommandBuffer.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandBuffer).GetComponent <ProdBattleCommandBuffer>(), BattleTaskManager.GetStage(), effectModel, _nCurrentShellingCnt); BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer.Play(delegate { if (effectModel.Withdrawal) { BattleTaskManager.ReqPhase(BattlePhase.WithdrawalDecision); } else { CheckNextAction(); } }); } else { CheckNextAction(); } return(false); }
private void SetCircleSize(FleetType iType) { BattleManager battleManager = BattleTaskManager.GetBattleManager(); base.transform.localScale = Vector3.one * CalcCircleSize((iType != 0) ? battleManager.ShipCount_e : battleManager.ShipCount_f, (iType != 0) ? battleManager.FormationId_e : battleManager.FormationId_f); }
protected override bool Init() { BattleTaskManager.GetPrefabFile().battleShutter.Init(BaseShutter.ShutterMode.Close); if (BattleTaskManager.GetBattleManager().IsPractice) { _async = Application.LoadLevelAsync(Generics.Scene.Strategy.ToString()); _async.allowSceneActivation = true; } else { _prodAdvancingWithDrawalDC = ProdAdvancingWithDrawalDC.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdAdvancingWithDrawalDC).GetComponent <ProdAdvancingWithDrawalDC>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, BattleTaskManager.GetRootType()); _prodAdvancingWithDrawalDC.Play(DecideAdvancinsWithDrawalBtn); } return(true); }
private IEnumerator CreateCutIn(IObserver <bool> observer) { BattleCameras cams = BattleTaskManager.GetBattleCameras(); cams.SwitchMainCamera(FleetType.Friend); cams.InitEnemyFieldCameraDefault(); _prodSupportCutIn = ProdSupportCutIn.Instantiate(parent: cams.cutInCamera.transform, prefab: ((Component)BattleTaskManager.GetPrefabFile().prefabProdSupportCutIn).GetComponent <ProdSupportCutIn>(), model: _clsShien); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private IEnumerator CreateThalassocracy(IObserver <bool> observer) { _prodThalassocracy = ProdThalassocracy.Instantiate(PrefabFile.Load <ProdThalassocracy>(PrefabFileInfos.Thalassocracy), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsInput, SortieBattleTaskManager.GetMapManager(), _clsResultModel, BattleTaskManager.GetBattleManager().Ships_f, 120); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private IEnumerator CreateShelling(IObserver <bool> observer) { _prodSupportShelling = ProdSupportShelling.Instantiate(Resources.Load <ProdSupportShelling>("Prefabs/Battle/Production/SupportingFire/ProdSupportShelling"), _clsShelling, BattleTaskManager.GetBattleCameras().cutInCamera.transform); yield return(new WaitForEndOfFrame()); _prodSupportShelling.CreateHpGauge(FleetType.Enemy); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private IEnumerator createMapOpen(IObserver <bool> observer) { _prodMapOpen = ProdMapOpen.Instantiate(PrefabFile.Load <ProdMapOpen>(PrefabFileInfos.MapOpen), _clsResultModel, BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsInput, _clsMapManager, 120); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
public bool Init(List <ShipModel_BattleAll> ships) { _listHPBar = new List <BtlCut_HPBar>(); ships.ForEach(delegate(ShipModel_BattleAll x) { if (x != null) { _listHPBar.Add(BtlCut_HPBar.Instantiate(((Component)_prefabUIShortCutHPBar).GetComponent <BtlCut_HPBar>(), _traAnchor, x, isAfter: true, BattleTaskManager.GetBattleManager())); _listHPBar[x.Index].SetHPLabelColor(Color.white); } }); return(true); }
private IEnumerator CreateShortRewardGet(IObserver <bool> observer) { if (_clsResultModel.GetAreaRewardItems() == null) { observer.OnNext(value: false); observer.OnCompleted(); yield break; } _prodShortRewardGet = ProdShortRewardGet.Instantiate(Resources.Load <ProdShortRewardGet>("Prefabs/Battle/Production/MapOpen/ProdShortRewardGet"), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsResultModel.GetAreaRewardItems()); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
protected override bool Init() { _clsBossInsert = BattleTaskManager.GetBattleManager().GetBossInsertData(); if (_clsBossInsert == null) { ImmediateTermination(); EndPhase(BattleUtils.NextPhase(BattlePhase.BattlePhase_ST)); } else { ProdBossInsert prodBossInsert = ProdBossInsert.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBossInsert).GetComponent <ProdBossInsert>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsBossInsert.Ship); prodBossInsert.Play(delegate { EndPhase(BattleUtils.NextPhase(BattlePhase.BattlePhase_ST)); }); } return(true); }
protected override bool Init() { this._prodBattleCommandSelect = ProdBattleCommandSelect.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdBattleCommandSelect.GetComponent <ProdBattleCommandSelect>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), BattleTaskManager.GetBattleManager().GetCommandPhaseModel()); this._clsRationModel = BattleTaskManager.GetBattleManager().GetRationModel(); if (this._clsRationModel != null) { this._prodCombatRation = ProdCombatRation.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdCombatRation.GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), this._clsRationModel); this._prodCombatRation.Play(new Action(this.OnCombatRationFinished)); ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction(); observerAction.Register(delegate { Mem.DelComponentSafe <ProdCombatRation>(ref this._prodCombatRation); }); } else { this.OnCombatRationFinished(); } return(true); }
private void SetCircleSize(FleetType iType) { BattleManager battleManager = BattleTaskManager.GetBattleManager(); base.get_transform().set_localScale(Vector3.get_one() * this.CalcCircleSize((iType != FleetType.Friend) ? battleManager.ShipCount_e : battleManager.ShipCount_f, (iType != FleetType.Friend) ? battleManager.FormationId_e : battleManager.FormationId_f)); }