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 static Vector3 GetShipOffsPos(ShipModel_Battle model, bool isDamaged, MstShipGraphColumn iColumn) { bool damaged = model.IsFriend() ? isDamaged : (model.IsPractice() && isDamaged); switch (iColumn) { case MstShipGraphColumn.Foot: return(Util.Poi2Vec(model.Offsets.GetFoot_InBattle(damaged))); case MstShipGraphColumn.PointOfGaze: return(Util.Poi2Vec(model.Offsets.GetPog_InBattle(damaged))); case MstShipGraphColumn.SPPointOfGaze: return((!model.IsPractice() || model.IsFriend()) ? Util.Poi2Vec(model.Offsets.GetPogSp_InBattle(damaged)) : Util.Poi2Vec(model.Offsets.GetPogSpEnsyu_InBattle(damaged))); case MstShipGraphColumn.CutIn: return(Util.Poi2Vec(model.Offsets.GetCutin_InBattle(damaged))); case MstShipGraphColumn.CutInSp1: return(Util.Poi2Vec(model.Offsets.GetCutinSp1_InBattle(damaged))); default: return(Vector3.zero); } }
public static ShipModel_Battle GetDetectionPrimaryShip(List <List <SlotitemModel_Battle> > models, bool isFriend) { ShipModel_Battle result = null; BattleManager battleManager = BattleTaskManager.GetBattleManager(); if (battleManager == null) { return(result); } int num = 0; foreach (List <SlotitemModel_Battle> model in models) { if (model == null) { num++; } else { foreach (SlotitemModel_Battle item in model) { if (item != null) { result = battleManager.GetShip(num, isFriend); break; } num++; } } } return(result); }
public static void StopShipVoice(ShipModel_Battle model) { if (SingletonMonoBehaviour <SoundManager> .Instance != null && SingletonMonoBehaviour <ResourceManager> .Instance != null) { SingletonMonoBehaviour <SoundManager> .Instance.StopVoice(model.Index); } }
public override string ToString() { string text = string.Empty; List <ShipModel_Defender> defenders = GetDefenders(is_friend: true, all: true); for (int i = 0; i < defenders.Count; i++) { ShipModel_Battle shipModel_Battle = defenders[i]; if (shipModel_Battle != null) { ShipModel_Defender attackTo = GetAttackTo(shipModel_Battle.TmpId); if (attackTo != null) { RaigekiDamageModel attackDamage = GetAttackDamage(attackTo.TmpId); text += string.Format("{0}({1}) から {2}({3}) へ雷撃 (ダメ\u30fcジ:{4}(c:{7}) {5}{6})\n", shipModel_Battle.Name, shipModel_Battle.Index, attackTo.Name, attackTo.Index, attackDamage.GetDamage(shipModel_Battle.TmpId), attackDamage.GetHitState(shipModel_Battle.TmpId), (!attackDamage.GetProtectEffect(shipModel_Battle.TmpId)) ? string.Empty : "[かばう]", attackDamage.__GetDamage__(shipModel_Battle.TmpId)); } } } defenders = GetDefenders(is_friend: false, all: true); for (int j = 0; j < defenders.Count; j++) { ShipModel_Battle shipModel_Battle2 = defenders[j]; if (shipModel_Battle2 != null) { ShipModel_Defender attackTo2 = GetAttackTo(shipModel_Battle2.TmpId); if (attackTo2 != null) { RaigekiDamageModel attackDamage2 = GetAttackDamage(attackTo2.TmpId); text += string.Format("{0}({1}) から {2}({3}) へ雷撃 (ダメ\u30fcジ:{4}(c:{7}) {5}{6})\n", shipModel_Battle2.Name, shipModel_Battle2.Index, attackTo2.Name, attackTo2.Index, attackDamage2.GetDamage(shipModel_Battle2.TmpId), attackDamage2.GetHitState(shipModel_Battle2.TmpId), (!attackDamage2.GetProtectEffect(shipModel_Battle2.TmpId)) ? string.Empty : "[かばう]", attackDamage2.__GetDamage__(shipModel_Battle2.TmpId)); } } } return(text); }
private void PlayNextFocusShipCircleAnimation() { if (_clsEffectModel.NextActionShip != null) { ShipModel_Battle focusShip = _clsEffectModel.NextActionShip; BattleShips battleShips = BattleTaskManager.GetBattleShips(); int cnt = 0; battleShips.bufferShipCirlce[0].ForEach(delegate(UIBufferCircle x) { x.PlayFocusCircleAnimation(focusShip.IsFriend() && focusShip.Index == cnt); cnt++; }); cnt = 0; battleShips.bufferShipCirlce[1].ForEach(delegate(UIBufferCircle x) { x.PlayFocusCircleAnimation(!focusShip.IsFriend() && focusShip.Index == cnt); cnt++; }); List <UIBufferFleetCircle> bufferFleetCircle = battleShips.bufferFleetCircle; bufferFleetCircle.ForEach(delegate(UIBufferFleetCircle x) { x.PlayFocusCircleAnimation(); }); } }
public static void PlayShipVoice(ShipModel_Battle model, int voiceNum) { if (SingletonMonoBehaviour <SoundManager> .Instance != null && SingletonMonoBehaviour <ResourceManager> .Instance != null && model != null) { int index = (!model.IsFriend()) ? (model.Index + 6) : model.Index; SingletonMonoBehaviour <SoundManager> .Instance.PlayVoice(SingletonMonoBehaviour <ResourceManager> .Instance.ShipVoice.Load(model.GetVoiceMstId(voiceNum), voiceNum), index); } }
private static Vector3?GetShipPointOfGaze(ShipModel_Battle model) { if (model != null) { return(BattleTaskManager.GetBattleShips().dicFriendBattleShips[model.Index].pointOfGaze); } return(null); }
public ShipModel_Battle GetFirstActionShip() { ShipModel_Battle shipModel_Battle = this._GetFirstActionShip(this.Action_f); if (shipModel_Battle == null) { shipModel_Battle = this._GetFirstActionShip(this.Action_e); } return(shipModel_Battle); }
public ShipModel_Battle GetFirstActionShip() { ShipModel_Battle captainShip = this.GetCaptainShip(true); if (captainShip == null) { captainShip = this.GetCaptainShip(false); } return(captainShip); }
public ShipModel_Battle GetFirstActionShip() { ShipModel_Battle captainShip = GetCaptainShip(is_friend: true); if (captainShip == null) { captainShip = GetCaptainShip(is_friend: false); } return(captainShip); }
public static string log(ShipModel_Battle[] ships) { string text = string.Empty; for (int i = 0; i < ships.Length; i++) { ShipModel_Battle shipModel_Battle = ships[i]; text = ((shipModel_Battle != null) ? (text + shipModel_Battle.ToString() + "\n") : (text + $"[{i}] - \n")); } return(text); }
public override string ToString() { string text = string.Empty; List <ShipModel_Defender> defenders = this.GetDefenders(true, true); for (int i = 0; i < defenders.get_Count(); i++) { ShipModel_Battle shipModel_Battle = defenders.get_Item(i); if (shipModel_Battle != null) { ShipModel_Defender attackTo = this.GetAttackTo(shipModel_Battle.TmpId); if (attackTo != null) { RaigekiDamageModel attackDamage = this.GetAttackDamage(attackTo.TmpId); text += string.Format("{0}({1}) から {2}({3}) へ雷撃 (ダメージ:{4}(c:{7}) {5}{6})\n", new object[] { shipModel_Battle.Name, shipModel_Battle.Index, attackTo.Name, attackTo.Index, attackDamage.GetDamage(shipModel_Battle.TmpId), attackDamage.GetHitState(shipModel_Battle.TmpId), (!attackDamage.GetProtectEffect(shipModel_Battle.TmpId)) ? string.Empty : "[かばう]", attackDamage.__GetDamage__(shipModel_Battle.TmpId) }); } } } defenders = this.GetDefenders(false, true); for (int j = 0; j < defenders.get_Count(); j++) { ShipModel_Battle shipModel_Battle2 = defenders.get_Item(j); if (shipModel_Battle2 != null) { ShipModel_Defender attackTo2 = this.GetAttackTo(shipModel_Battle2.TmpId); if (attackTo2 != null) { RaigekiDamageModel attackDamage2 = this.GetAttackDamage(attackTo2.TmpId); text += string.Format("{0}({1}) から {2}({3}) へ雷撃 (ダメージ:{4}(c:{7}) {5}{6})\n", new object[] { shipModel_Battle2.Name, shipModel_Battle2.Index, attackTo2.Name, attackTo2.Index, attackDamage2.GetDamage(shipModel_Battle2.TmpId), attackDamage2.GetHitState(shipModel_Battle2.TmpId), (!attackDamage2.GetProtectEffect(shipModel_Battle2.TmpId)) ? string.Empty : "[かばう]", attackDamage2.__GetDamage__(shipModel_Battle2.TmpId) }); } } } return(text); }
public static AudioSource PlayShellingSE(ShipModel_Battle model) { if (model.ShipType == 8 || model.ShipType == 9 || model.ShipType == 10) { return(KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_903)); } if (model.ShipType == 5) { return(KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_902)); } return(KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_901)); }
private List <PlaneModel> _GetPlane(ShipModel_Battle ship) { List <PlaneModel> list; if (ship.IsFriend()) { list = this._planes_f.ConvertAll <PlaneModel>((PlaneModelBase plane) => (PlaneModel)plane); } else { list = this._planes_e.ConvertAll <PlaneModel>((PlaneModelBase plane) => (PlaneModel)plane); } return(list.FindAll((PlaneModel plane) => plane.Parent.TmpId == ship.TmpId)); }
public PlaneModelBase[] GetPlane(int ship_tmp_id) { ShipModel_Battle shipModel_Battle = _ships_f.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == ship_tmp_id); if (shipModel_Battle == null) { shipModel_Battle = _ships_e.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == ship_tmp_id); } if (shipModel_Battle == null) { return(new PlaneModelBase[0]); } return(_GetPlane(shipModel_Battle).ToArray()); }
public void SetShipInfos(ShipModel_BattleAll model, bool isStart) { if (model == null) { _clsShip = model; this.SetActive(isActive: false); return; } _clsShip = model; _iFleetType = ((!model.IsFriend()) ? FleetType.Enemy : FleetType.Friend); SetShipTexture(model, isStart); SetPointOfGaze(model, isStart); SetSPPointOfGaze(model, isStart); base.name = model.Name; }
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 ProdTorpedoCutIn.AnimationList getAnimationList(ShipModel_Battle friendShip, ShipModel_Battle enemyShip) { if (friendShip == null && enemyShip == null) { return(ProdTorpedoCutIn.AnimationList.None); } if (friendShip != null && enemyShip == null) { return(ProdTorpedoCutIn.AnimationList.TorpedoCutInFriend); } if (friendShip == null && enemyShip != null) { return(ProdTorpedoCutIn.AnimationList.TorpedoCutInEnemy); } return(ProdTorpedoCutIn.AnimationList.ProdTorpedoCutIn); }
public static string log(ShipModel_Battle[] ships) { string text = string.Empty; for (int i = 0; i < ships.Length; i++) { ShipModel_Battle shipModel_Battle = ships[i]; if (shipModel_Battle == null) { text += string.Format("[{0}] - \n", i); } else { text = text + shipModel_Battle.ToString() + "\n"; } } return(text); }
private bool _createTorpedoWakeOnes(bool isFriend) { FleetType key = (!isFriend) ? FleetType.Enemy : FleetType.Friend; Dictionary <int, UIBattleShip> dictionary = (!isFriend) ? BattleTaskManager.GetBattleShips().dicEnemyBattleShips : BattleTaskManager.GetBattleShips().dicFriendBattleShips; Dictionary <int, UIBattleShip> dictionary2 = (!isFriend) ? BattleTaskManager.GetBattleShips().dicFriendBattleShips : BattleTaskManager.GetBattleShips().dicEnemyBattleShips; if (_dicIsAttack[key]) { for (int i = 0; i < dictionary.Count; i++) { ShipModel_Battle shipModel = dictionary[i].shipModel; ShipModel_Battle attackTo = _clsTorpedo.GetAttackTo(shipModel); if (shipModel != null && attackTo != null) { Vector3 position = dictionary[i].transform.position; Vector3 vector; if (isFriend) { Vector3 position2 = dictionary2[attackTo.Index].transform.position; vector = new Vector3(position2.x, position.y, position.z - 1f); } else { Vector3 position3 = dictionary2[attackTo.Index].transform.position; vector = new Vector3(position3.x, position.y, position.z + 1f); } Vector3 injection = vector; RaigekiDamageModel attackDamage = _clsTorpedo.GetAttackDamage(attackTo.Index, (!isFriend) ? true : false); int key2 = (!attackDamage.GetProtectEffect(shipModel.TmpId)) ? attackTo.Index : 0; float num = (!isFriend) ? (-20f) : 20f; float num2 = (attackDamage.GetHitState(shipModel.TmpId) != 0) ? 0f : (-3f); Vector3 position4 = dictionary2[key2].transform.position; _onesTorpedoWake = _instantiateTorpedo(target: new Vector3(position4.x + num2, position4.y, position4.z + num), injection: injection, index: i, _time: 2.65f, isDet: false, isMiss: false, isD: true); _setCameraPosition(injection.x); _straightTarget = position4; Vector3 pointOfGaze = dictionary2[key2].pointOfGaze; _straightTargetGazeY = pointOfGaze.y; break; } } } return((_onesTorpedoWake != null) ? true : false); }
public static ShipModel_Battle GetDetectionPrimaryShip(List <List <SlotitemModel_Battle> > models, bool isFriend) { ShipModel_Battle result = null; BattleManager battleManager = BattleTaskManager.GetBattleManager(); if (battleManager == null) { return(result); } int num = 0; using (List <List <SlotitemModel_Battle> > .Enumerator enumerator = models.GetEnumerator()) { while (enumerator.MoveNext()) { List <SlotitemModel_Battle> current = enumerator.get_Current(); if (current == null) { num++; } else { using (List <SlotitemModel_Battle> .Enumerator enumerator2 = current.GetEnumerator()) { while (enumerator2.MoveNext()) { if (enumerator2.get_Current() != null) { result = battleManager.GetShip(num, isFriend); break; } num++; } } } } } return(result); }
private void _createTorpedo(FleetType type, Dictionary <int, UIBattleShip> dicAttackShip, Dictionary <int, UIBattleShip> dicDefenceShip) { if (!_dicIsAttack[type]) { return; } for (int i = 0; i < dicAttackShip.Count; i++) { ShipModel_Battle shipModel = dicAttackShip[i].shipModel; ShipModel_Battle attackTo = _clsTorpedo.GetAttackTo(shipModel); if (shipModel != null && attackTo != null) { if (shipModel.ShipType == 4) { _isTC[(int)type] = true; } if (_listTorpedoWake != null) { _listTorpedoWake.Add(_instantiateTorpedo(dicAttackShip[i].transform.position, dicDefenceShip[attackTo.Index].transform.position, i, 8f, isDet: false, isMiss: false, isD: false)); } } } }
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); }
private ShipModel_Battle _GetFirstActionShip(int order) { if (order <= 0) { if (this.IsExistKoukuuData()) { ShipModel_Battle firstActionShip = this.GetKoukuuData().GetFirstActionShip(); if (firstActionShip != null) { return(firstActionShip); } } if (this.IsExistShienData()) { return(null); } if (this.IsExistKaimakuData()) { ShipModel_Battle firstActionShip2 = this.GetKaimakuData().GetFirstActionShip(); if (firstActionShip2 != null) { return(firstActionShip2); } } if (this.GetEffectData(0) != null) { return(null); } } if (order <= 1) { CmdActionPhaseModel hougekiData_Day = this.GetHougekiData_Day(0); if (hougekiData_Day != null) { ShipModel_Battle firstActionShip3 = hougekiData_Day.GetFirstActionShip(); if (firstActionShip3 != null) { return(firstActionShip3); } if (this.GetEffectData(1) != null) { return(null); } } } if (order <= 2) { CmdActionPhaseModel hougekiData_Day2 = this.GetHougekiData_Day(1); if (hougekiData_Day2 != null) { ShipModel_Battle firstActionShip4 = hougekiData_Day2.GetFirstActionShip(); if (firstActionShip4 != null) { return(firstActionShip4); } if (this.GetEffectData(2) != null) { return(null); } } } if (order <= 3) { CmdActionPhaseModel hougekiData_Day3 = this.GetHougekiData_Day(2); if (hougekiData_Day3 != null) { ShipModel_Battle firstActionShip5 = hougekiData_Day3.GetFirstActionShip(); if (firstActionShip5 != null) { return(firstActionShip5); } if (this.GetEffectData(3) != null) { return(null); } } } if (order <= 4) { CmdActionPhaseModel hougekiData_Day4 = this.GetHougekiData_Day(3); if (hougekiData_Day4 != null) { ShipModel_Battle firstActionShip6 = hougekiData_Day4.GetFirstActionShip(); if (firstActionShip6 != null) { return(firstActionShip6); } if (this.GetEffectData(4) != null) { return(null); } } } if (order <= 5) { CmdActionPhaseModel hougekiData_Day5 = this.GetHougekiData_Day(4); if (hougekiData_Day5 != null) { ShipModel_Battle firstActionShip7 = hougekiData_Day5.GetFirstActionShip(); if (firstActionShip7 != null) { return(firstActionShip7); } } if (this.IsExistRaigekiData()) { ShipModel_Battle firstActionShip7 = this.GetRaigekiData().GetFirstActionShip(); if (firstActionShip7 != null) { return(firstActionShip7); } } if (this.IsExistKoukuuData2()) { ShipModel_Battle firstActionShip7 = this.GetKoukuuData2().GetFirstActionShip(); if (firstActionShip7 != null) { return(firstActionShip7); } } } return(null); }
public void __createCacheDataAfterCommand__() { if (this._phase != CombatPhase.DAY) { return; } if (!this.IsTakeCommand()) { return; } this._cache_opening_effect = null; if (this._battleData.DayBattle.OpeningProduction != null) { this._cache_opening_effect = new __EffectModel__(this._battleData.DayBattle.OpeningProduction); } this._cache_kouku = null; if (this._battleData.DayBattle.AirBattle != null) { int count = this._battleData.DayBattle.AirBattle.F_PlaneFrom.get_Count(); int count2 = this._battleData.DayBattle.AirBattle.E_PlaneFrom.get_Count(); if (count > 0 || count2 > 0) { this._cache_kouku = new KoukuuModel(this._ships_f, this._ships_e, this._battleData.DayBattle.AirBattle); } } this._cache_shien = null; if (this._battleData.DayBattle.SupportAtack != null) { SupportAtack supportAtack = this._battleData.DayBattle.SupportAtack; int deck_Id = supportAtack.Deck_Id; DeckModel deck = base.UserInfo.GetDeck(deck_Id); BattleSupportKinds supportType = supportAtack.SupportType; if (supportType == BattleSupportKinds.AirAtack) { this._cache_shien = new ShienModel_Air(deck, this._ships_f, this._ships_e, supportAtack); } else if (supportType == BattleSupportKinds.Hougeki) { this._cache_shien = new ShienModel_Hou(deck, this._ships_f, this._ships_e, supportAtack); } else if (supportType == BattleSupportKinds.Raigeki) { this._cache_shien = new ShienModel_Rai(deck, this._ships_f, this._ships_e, supportAtack); } } this._cache_kaimaku = null; if (this._battleData.DayBattle.OpeningAtack != null) { this._cache_kaimaku = new RaigekiModel(this._ships_f, this._ships_e, this._battleData.DayBattle.OpeningAtack); if (this._cache_kaimaku.Count_f == 0 && this._cache_kaimaku.Count_e == 0) { this._cache_kaimaku = null; } } this._cache_cmd_actions = null; if (this._battleData.DayBattle.FromMiddleDayBattle != null) { this._cache_cmd_actions = new List <CmdActionPhaseModel>(); Dictionary <int, ShipModel_BattleAll> ships = this._GetShipsDic(); for (int i = 0; i < this._battleData.DayBattle.FromMiddleDayBattle.get_Count(); i++) { FromMiddleBattleDayData data = this._battleData.DayBattle.FromMiddleDayBattle.get_Item(i); CmdActionPhaseModel cmdActionPhaseModel = new CmdActionPhaseModel(data, ships); this._cache_cmd_actions.Add(cmdActionPhaseModel); } if (this._cache_cmd_actions.TrueForAll((CmdActionPhaseModel model) => model == null || !model.HasAction())) { this._cache_cmd_actions = null; } else if (this._cache_cmd_actions.get_Count() == 0) { this._cache_cmd_actions = null; } } this._cache_raigeki = null; if (this._battleData.DayBattle.Raigeki != null) { this._cache_raigeki = new RaigekiModel(this._ships_f, this._ships_e, this._battleData.DayBattle.Raigeki); if (this._cache_raigeki.Count_f == 0 && this._cache_raigeki.Count_e == 0) { this._cache_raigeki = null; } } this._cache_kouku2 = null; if (this._battleData.DayBattle.AirBattle2 != null) { int count3 = this._battleData.DayBattle.AirBattle2.F_PlaneFrom.get_Count(); int count4 = this._battleData.DayBattle.AirBattle2.E_PlaneFrom.get_Count(); if (count3 > 0 || count4 > 0) { this._cache_kouku2 = new KoukuuModel(this._ships_f, this._ships_e, this._battleData.DayBattle.AirBattle2); } } if (this._cache_opening_effect != null) { ShipModel_Battle nextActionShip = this._GetFirstActionShip(0); ((__EffectModel__)this._cache_opening_effect).SetNextActionShip(nextActionShip); } if (this._cache_cmd_actions != null) { for (int j = 0; j < this._cache_cmd_actions.get_Count(); j++) { CmdActionPhaseModel cmdActionPhaseModel2 = this._cache_cmd_actions.get_Item(j); if (cmdActionPhaseModel2 != null && cmdActionPhaseModel2.Effect != null) { ShipModel_Battle nextActionShip = this._GetFirstActionShip(j + 1); ((__EffectModel__)cmdActionPhaseModel2.Effect).SetNextActionShip(nextActionShip); } } } }
public ShipModel_Defender GetAttackTo(ShipModel_Battle attacker) { return(this.GetAttackTo(attacker.TmpId)); }
public static void PlayFlagshipWreckVoice(ShipModel_Battle model) { PlayShipVoice(model, 20); }
public static void PlayMVPVoice(ShipModel_Battle model) { PlayShipVoice(model, 23); }
public static void PlaySinkingVoice(ShipModel_Battle model) { PlayShipVoice(model, 22); }