private void _compTorpedoAttack() { bool flag = false; float[] array = new float[6] { -416f, -310f, -205f, -70f, 115f, 350f }; List<ShipModel_Defender> defenders = _clsTorpedo.GetDefenders(is_friend: false); for (int i = 0; i < defenders.Count; i++) { _battleHpGauges.Show(i, new Vector3(setHpGaugePosition(defenders.Count, i), -210f, 0f), new Vector3(0.22f, 0.22f, 0.22f), isScale: false); _battleHpGauges.PlayHp(i, null); DamageModel attackDamage = _clsTorpedo.GetAttackDamage(defenders[i].TmpId); if (attackDamage.GetHitState() == BattleHitStatus.Miss) { _battleHpGauges.PlayMiss(i); } else if (attackDamage.GetHitState() == BattleHitStatus.Clitical) { flag = true; _battleHpGauges.PlayCritical(i); } } if (_isAttackE) { KCV.Utils.SoundUtils.PlaySE((!flag) ? SEFIleInfos.SE_909 : SEFIleInfos.SE_910); _camFriend.cameraShake.ShakeRot(null); } _setState(StateType.End); }
private void _hitExplosion() { BattleTaskManager.GetBattleField().AlterWaveDirection(FleetType.Friend); BattleTaskManager.GetBattleCameras().cutInCamera.enabled = true; if (_isAttack) { _fieldCam.cameraShake.ShakeRot(null); } for (int i = 0; i < _defenders.Count; i++) { DamageModel attackDamage = _clsShelling.GetAttackDamage(_defenders[i].TmpId); _battleHpGauges.Show(i, _eHpPos[i], new Vector3(0.35f, 0.35f, 0.35f), isScale: false); BattleHPGauges battleHpGauges = _battleHpGauges; int num = i; Vector3 damagePosition = _battleHpGauges.GetDamagePosition(i); battleHpGauges.SetDamagePosition(num, new Vector3(damagePosition.x, -525f, 0f)); _battleHpGauges.PlayHp(i, null); if (attackDamage.GetHitState() == BattleHitStatus.Miss) { _battleHpGauges.PlayMiss(i); } else if (attackDamage.GetHitState() == BattleHitStatus.Clitical) { _battleHpGauges.PlayCritical(i); } } _setShinking(); int eCnt = (_listExplosion != null) ? _listExplosion.Count : 0; int mCnt = (_listMiss != null) ? _listMiss.Count : 0; Observable.FromCoroutine(_playExplosion).Subscribe(delegate { if (eCnt >= mCnt) { _isEx = true; } }); Observable.FromCoroutine(_playMissSplash).Subscribe(delegate { if (mCnt >= eCnt) { _isEx = true; } }); if (_listExplosion == null && _listMiss == null) { _isEx = true; } if ((_listExplosion != null) & (_listExplosion.Count > 0)) { KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.Explode); } if ((_listMiss != null) & (_listMiss.Count > 0)) { KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.BattleTorpedo); } }