private void _setTorpedoWakeZoom(bool isFriend) { if (_createTorpedoWakeOnes(isFriend)) { _onesTorpedoWake.Injection(iTween.EaseType.linear, isPlaySE: false, isTC: false, delegate { }); } }
private void _createTorpedoWakeOnes() { Dictionary <int, UIBattleShip> dicFriendBattleShips = BattleTaskManager.GetBattleShips().dicFriendBattleShips; Dictionary <int, UIBattleShip> dicEnemyBattleShips = BattleTaskManager.GetBattleShips().dicEnemyBattleShips; bool isTC = false; for (int i = 0; i < this._clsTorpedo.ShienShips.Length; i++) { if (this._clsTorpedo.ShienShips[i] != null) { if (this._clsTorpedo.ShienShips[i].ShipType == 4) { isTC = true; } } } this._listTorpedoWake = new List <PSTorpedoWake>(); List <ShipModel_Defender> defenders = this._clsTorpedo.GetDefenders(false); for (int j = 0; j < defenders.get_Count(); j++) { DamageModel attackDamage = this._clsTorpedo.GetAttackDamage(defenders.get_Item(j).TmpId); Vector3 vecStraightTarget = (!attackDamage.GetProtectEffect()) ? dicEnemyBattleShips.get_Item(j).get_transform().get_position() : dicEnemyBattleShips.get_Item(0).get_transform().get_position(); Vector3 injection = new Vector3(vecStraightTarget.x, vecStraightTarget.y, dicFriendBattleShips.get_Item(0).get_transform().get_position().z - 1f); Vector3 target = (attackDamage.GetHitState() != BattleHitStatus.Miss) ? new Vector3(vecStraightTarget.x, vecStraightTarget.y, vecStraightTarget.z + 20f) : new Vector3(vecStraightTarget.x - 3f, vecStraightTarget.y, vecStraightTarget.z + 20f); this._listTorpedoWake.Add(this._createTorpedo(true, injection, target, 2.65f, false, false)); this._setTopCamera(injection.x); this._vecStraightTarget = vecStraightTarget; this._fStraightTargetGazeHeight = dicEnemyBattleShips.get_Item(j).pointOfGaze.y; } using (List <PSTorpedoWake> .Enumerator enumerator = this._listTorpedoWake.GetEnumerator()) { while (enumerator.MoveNext()) { PSTorpedoWake current = enumerator.get_Current(); current.Injection(iTween.EaseType.linear, true, isTC, delegate { }); } } }
private void _torpedoInjection() { this._camFriend.get_transform().set_position(new Vector3(-38f, 8f, -74f)); this._camFriend.get_transform().set_localRotation(Quaternion.Euler(new Vector3(9.5f, 137.5f, 0f))); bool isFirst = false; using (List <PSTorpedoWake> .Enumerator enumerator = this._listPSTorpedoWake.GetEnumerator()) { while (enumerator.MoveNext()) { PSTorpedoWake current = enumerator.get_Current(); current.Injection(iTween.EaseType.linear, false, false, delegate { if (!isFirst) { this._setShinking(); this._compTorpedoAttack(); isFirst = true; } }); } } }