From aa85f0f1e7999f2c87c6964485453f47e8e11db2 Mon Sep 17 00:00:00 2001 From: Nam Tae Gun Date: Mon, 1 Jul 2024 18:11:29 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EB=BF=94=EC=86=8C=20=EC=8A=A4?= =?UTF-8?q?=ED=82=AC=20=EC=B6=94=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02.Scripts/Skill/Enemy/Boss/Rhinoceros/BullCharge.cs | 4 ---- .../Skill/Enemy/Boss/Rhinoceros/SeismicThrust.cs | 9 ++++++++- .../Skill/Enemy/Boss/Rhinoceros/SkyFallSmash.cs | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/BullCharge.cs b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/BullCharge.cs index 921c8bd7a..80664134c 100644 --- a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/BullCharge.cs +++ b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/BullCharge.cs @@ -71,7 +71,6 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills _animationController.ResetAnimationSpeed(); IsUsingSkill = true; - var isAttacked = false; var startPosition = SkillUser.transform.position; var targetVector = _targetCollider.transform.position - startPosition; targetVector.y = 0f; @@ -115,14 +114,11 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills for (var i = 0; i < hitCount; i++) { - if (isAttacked) continue; - var raycastHit = RaycastHits[i]; var iDamageable = raycastHit.transform.GetComponentInParent(); if (iDamageable == null || !iDamageable.CanDamage()) continue; iDamageable.TakeDamage(SkillData.Damage); - isAttacked = true; var iStunnable = raycastHit.transform.GetComponentInParent(); iStunnable?.TryStun(_bullChargeData.StunDuration); diff --git a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SeismicThrust.cs b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SeismicThrust.cs index 6f1ec93ba..3a6ad1b40 100644 --- a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SeismicThrust.cs +++ b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SeismicThrust.cs @@ -71,12 +71,19 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills { EnableSkill = false; IsUsingSkill = true; + + var startPosition = SkillUser.transform.position; + var targetVector = _targetCollider.transform.position - startPosition; + targetVector.y = 0f; + var targetDirection = targetVector.normalized; + transform.position = SkillUser.transform.position + Vector3.up * 3f; - var angle = Mathf.Atan2(_rhinoceros.CurrentDirection.x, _rhinoceros.CurrentDirection.z) * Mathf.Rad2Deg; + var angle = Mathf.Atan2(targetDirection.x, targetDirection.z) * Mathf.Rad2Deg; transform.rotation = Quaternion.Euler(0, angle, 0); transform.localScale = new Vector3(_seismicThrustData.HorizontalRange, 6f, SkillData.Radius * 2); var myLocalScale = transform.localScale; _halfScale = new Vector3(myLocalScale.x * 0.5f, myLocalScale.y * 0.5f, myLocalScale.z * 0.25f); + _rhinoceros.CurrentDirection = targetDirection; ShowIndicator(); diff --git a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SkyFallSmash.cs b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SkyFallSmash.cs index 548a02188..2c6f6f481 100644 --- a/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SkyFallSmash.cs +++ b/Assets/02.Scripts/Skill/Enemy/Boss/Rhinoceros/SkyFallSmash.cs @@ -209,7 +209,7 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills hitDirection = hitDirection == Vector3.zero ? Vector3.right : hitDirection; var hitDistance = hitVector.magnitude; var powerCoefficient = stunRange - hitDistance; - var addForcePower = powerCoefficient / stunRange * _skyFallSmashData.PushPowerCoefficient; + var addForcePower = Mathf.Max(10f, powerCoefficient / stunRange * _skyFallSmashData.PushPowerCoefficient); iPhysicMovable.SetPush(hitDirection, addForcePower); } }