코뿔소 스킬 추가 수정
This commit is contained in:
parent
d878985662
commit
aa85f0f1e7
@ -71,7 +71,6 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
|||||||
|
|
||||||
_animationController.ResetAnimationSpeed();
|
_animationController.ResetAnimationSpeed();
|
||||||
IsUsingSkill = true;
|
IsUsingSkill = true;
|
||||||
var isAttacked = false;
|
|
||||||
var startPosition = SkillUser.transform.position;
|
var startPosition = SkillUser.transform.position;
|
||||||
var targetVector = _targetCollider.transform.position - startPosition;
|
var targetVector = _targetCollider.transform.position - startPosition;
|
||||||
targetVector.y = 0f;
|
targetVector.y = 0f;
|
||||||
@ -115,14 +114,11 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
|||||||
|
|
||||||
for (var i = 0; i < hitCount; i++)
|
for (var i = 0; i < hitCount; i++)
|
||||||
{
|
{
|
||||||
if (isAttacked) continue;
|
|
||||||
|
|
||||||
var raycastHit = RaycastHits[i];
|
var raycastHit = RaycastHits[i];
|
||||||
var iDamageable = raycastHit.transform.GetComponentInParent<IDamageable>();
|
var iDamageable = raycastHit.transform.GetComponentInParent<IDamageable>();
|
||||||
if (iDamageable == null || !iDamageable.CanDamage()) continue;
|
if (iDamageable == null || !iDamageable.CanDamage()) continue;
|
||||||
|
|
||||||
iDamageable.TakeDamage(SkillData.Damage);
|
iDamageable.TakeDamage(SkillData.Damage);
|
||||||
isAttacked = true;
|
|
||||||
|
|
||||||
var iStunnable = raycastHit.transform.GetComponentInParent<IStunnable>();
|
var iStunnable = raycastHit.transform.GetComponentInParent<IStunnable>();
|
||||||
iStunnable?.TryStun(_bullChargeData.StunDuration);
|
iStunnable?.TryStun(_bullChargeData.StunDuration);
|
||||||
|
@ -71,12 +71,19 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
|||||||
{
|
{
|
||||||
EnableSkill = false;
|
EnableSkill = false;
|
||||||
IsUsingSkill = true;
|
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;
|
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.rotation = Quaternion.Euler(0, angle, 0);
|
||||||
transform.localScale = new Vector3(_seismicThrustData.HorizontalRange, 6f, SkillData.Radius * 2);
|
transform.localScale = new Vector3(_seismicThrustData.HorizontalRange, 6f, SkillData.Radius * 2);
|
||||||
var myLocalScale = transform.localScale;
|
var myLocalScale = transform.localScale;
|
||||||
_halfScale = new Vector3(myLocalScale.x * 0.5f, myLocalScale.y * 0.5f, myLocalScale.z * 0.25f);
|
_halfScale = new Vector3(myLocalScale.x * 0.5f, myLocalScale.y * 0.5f, myLocalScale.z * 0.25f);
|
||||||
|
_rhinoceros.CurrentDirection = targetDirection;
|
||||||
|
|
||||||
ShowIndicator();
|
ShowIndicator();
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
|||||||
hitDirection = hitDirection == Vector3.zero ? Vector3.right : hitDirection;
|
hitDirection = hitDirection == Vector3.zero ? Vector3.right : hitDirection;
|
||||||
var hitDistance = hitVector.magnitude;
|
var hitDistance = hitVector.magnitude;
|
||||||
var powerCoefficient = stunRange - hitDistance;
|
var powerCoefficient = stunRange - hitDistance;
|
||||||
var addForcePower = powerCoefficient / stunRange * _skyFallSmashData.PushPowerCoefficient;
|
var addForcePower = Mathf.Max(10f, powerCoefficient / stunRange * _skyFallSmashData.PushPowerCoefficient);
|
||||||
iPhysicMovable.SetPush(hitDirection, addForcePower);
|
iPhysicMovable.SetPush(hitDirection, addForcePower);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user