푸쉬 로직 수정에 맞게 보스 스킬 데이터 수정
This commit is contained in:
parent
54582acbf4
commit
d878985662
@ -82,9 +82,15 @@ namespace BlueWater.Players.Combat
|
||||
}
|
||||
}
|
||||
|
||||
[field: SerializeField, DisableIf("@true")]
|
||||
public Vector3 PushDirection { get; private set; }
|
||||
|
||||
[field: SerializeField, DisableIf("@true")]
|
||||
public float PushPower { get; private set; }
|
||||
public float PushReductionCoefficient { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public float PushPowerReduction { get; private set; } = 20f;
|
||||
|
||||
private Vector3 _finalVelocity;
|
||||
|
||||
// Dash
|
||||
@ -139,28 +145,9 @@ namespace BlueWater.Players.Combat
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!IsMoveEnabled) return;
|
||||
if (!CanMove()) return;
|
||||
|
||||
if (!_isDashing && _comboAttackable?.CurrentComboAttackCount <= 0 && _skillHandler?.IsActivatingSkill == false)
|
||||
{
|
||||
var velocityDirection = _inputDirection;
|
||||
if (_stunnable?.IsStunned == true)
|
||||
{
|
||||
velocityDirection = Vector3.zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentDirection = velocityDirection;
|
||||
}
|
||||
|
||||
IsMoving = velocityDirection != Vector3.zero;
|
||||
_finalVelocity = velocityDirection * (MoveSpeed * MoveSpeedCoefficient);
|
||||
var pushVelocity = PushDirection * PushPower;
|
||||
_finalVelocity += pushVelocity;
|
||||
Rigidbody.linearVelocity = _finalVelocity;
|
||||
}
|
||||
|
||||
PushPower = Mathf.Max(0, PushPower - PushReductionCoefficient * Time.deltaTime);
|
||||
Move();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
@ -224,27 +211,61 @@ namespace BlueWater.Players.Combat
|
||||
// Move
|
||||
public bool CanMove()
|
||||
{
|
||||
if (!IsMoveEnabled || IsDashing) return false;
|
||||
return IsMoveEnabled;
|
||||
|
||||
var isActivatingSkill = _skillHandler?.IsActivatingSkill ?? false;
|
||||
var isStunned = _stunnable?.IsStunned ?? false;
|
||||
// if (isStunned)
|
||||
// if (!IsMoveEnabled || IsDashing) return false;
|
||||
//
|
||||
// var isActivatingSkill = _skillHandler?.IsActivatingSkill ?? false;
|
||||
// var isStunned = _stunnable?.IsStunned ?? false;
|
||||
// // if (isStunned)
|
||||
// // {
|
||||
// // IsMoving = false;
|
||||
// // }
|
||||
// var isAttacking = _comboAttackable?.CurrentComboAttackCount > 0;
|
||||
//
|
||||
// var canMove = !isActivatingSkill && !isStunned && !isAttacking;
|
||||
// if (!canMove)
|
||||
// {
|
||||
// if (!Rigidbody.isKinematic)
|
||||
// {
|
||||
// Rigidbody.linearVelocity = Vector3.zero;
|
||||
// }
|
||||
// IsMoving = false;
|
||||
// }
|
||||
var isAttacking = _comboAttackable?.CurrentComboAttackCount > 0;
|
||||
//
|
||||
// return canMove;
|
||||
}
|
||||
|
||||
var canMove = !isActivatingSkill && !isStunned && !isAttacking;
|
||||
if (!canMove)
|
||||
public void Move()
|
||||
{
|
||||
if (!_isDashing && _comboAttackable?.CurrentComboAttackCount <= 0 && _skillHandler?.IsActivatingSkill == false)
|
||||
{
|
||||
var velocityDirection = _inputDirection;
|
||||
if (_stunnable?.IsStunned == true)
|
||||
{
|
||||
velocityDirection = Vector3.zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentDirection = velocityDirection;
|
||||
}
|
||||
|
||||
IsMoving = velocityDirection != Vector3.zero;
|
||||
_finalVelocity = velocityDirection * (MoveSpeed * MoveSpeedCoefficient);
|
||||
var pushVelocity = PushDirection * PushPower;
|
||||
_finalVelocity += pushVelocity;
|
||||
if (!Rigidbody.isKinematic)
|
||||
{
|
||||
Rigidbody.linearVelocity = Vector3.zero;
|
||||
Rigidbody.linearVelocity = _finalVelocity;
|
||||
}
|
||||
IsMoving = false;
|
||||
}
|
||||
|
||||
return canMove;
|
||||
PushPower = Mathf.Max(0, PushPower - PushPowerReduction * Time.deltaTime);
|
||||
|
||||
// CurrentDirection = _inputDirection;
|
||||
// IsMoving = _inputDirection != Vector3.zero;
|
||||
// var finalVelocity = _inputDirection * (MoveSpeed * MoveSpeedCoefficient);
|
||||
// Rigidbody.linearVelocity = finalVelocity;
|
||||
}
|
||||
|
||||
public void AddForce(Vector3 force, ForceMode forceMode)
|
||||
@ -254,12 +275,10 @@ namespace BlueWater.Players.Combat
|
||||
Rigidbody.AddForce(force, forceMode);
|
||||
}
|
||||
|
||||
public void Move()
|
||||
public void SetPush(Vector3 pushDirection, float pushPower)
|
||||
{
|
||||
CurrentDirection = _inputDirection;
|
||||
IsMoving = _inputDirection != Vector3.zero;
|
||||
var finalVelocity = _inputDirection * (MoveSpeed * MoveSpeedCoefficient);
|
||||
Rigidbody.linearVelocity = finalVelocity;
|
||||
PushDirection = pushDirection;
|
||||
PushPower = pushPower;
|
||||
}
|
||||
|
||||
// Dash
|
||||
|
@ -50,6 +50,10 @@ namespace BlueWater.Players.Tycoons
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 PushDirection { get; private set; }
|
||||
public float PushPower { get; private set; }
|
||||
public float PushPowerReduction { get; private set; }
|
||||
|
||||
private float _finalSpeed;
|
||||
|
||||
#endregion
|
||||
@ -126,6 +130,11 @@ namespace BlueWater.Players.Tycoons
|
||||
Rigidbody.AddForce(force, forceMode);
|
||||
}
|
||||
|
||||
public void SetPush(Vector3 pushDirection, float pushPower)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
CurrentDirection = _inputDirection;
|
||||
|
@ -10,6 +10,9 @@ namespace BlueWater.Interfaces
|
||||
bool IsMoveEnabled { get; }
|
||||
bool IsMoving { get; }
|
||||
Vector3 CurrentDirection { get; }
|
||||
Vector3 PushDirection { get; }
|
||||
float PushPower { get; }
|
||||
float PushPowerReduction { get; }
|
||||
|
||||
void SetMoveSpeedCoefficient(float value);
|
||||
void ResetMoveSpeedCoefficient();
|
||||
@ -17,5 +20,6 @@ namespace BlueWater.Interfaces
|
||||
bool CanMove();
|
||||
void Move();
|
||||
void AddForce(Vector3 force, ForceMode forceMode);
|
||||
void SetPush(Vector3 pushDirection, float pushPower);
|
||||
}
|
||||
}
|
@ -39,15 +39,37 @@ namespace BlueWater
|
||||
[SerializeField]
|
||||
private LayerMask _targetLayer;
|
||||
|
||||
[Title("슬로우 설정")]
|
||||
[SerializeField]
|
||||
private bool _isSlowedMoveSpeed;
|
||||
|
||||
[SerializeField, ShowIf("@_isSlowedMoveSpeed")]
|
||||
private float _slowDuration;
|
||||
|
||||
[SerializeField, ShowIf("@_isSlowedMoveSpeed")]
|
||||
private float _moveSpeedCoefficient;
|
||||
|
||||
[Title("푸쉬 설정")]
|
||||
[SerializeField]
|
||||
private bool _isPushed;
|
||||
|
||||
[SerializeField, ShowIf("@_isPushed")]
|
||||
private float _pushPower;
|
||||
|
||||
[Title("효과음 설정")]
|
||||
[SerializeField]
|
||||
private string _awakeSfxName;
|
||||
|
||||
[SerializeField]
|
||||
private string _attackSfxName;
|
||||
|
||||
[Title("자동 파괴 옵션")]
|
||||
[SerializeField]
|
||||
private bool _useAutoDestroy = true;
|
||||
|
||||
[SerializeField, ShowIf("@_useAutoDestroy")]
|
||||
private float _autoDestroyTime = 10f;
|
||||
|
||||
[SerializeField]
|
||||
private string _awakeSfxName;
|
||||
|
||||
public float SphereRadius { get; private set; }
|
||||
|
||||
private float _detectionDistance;
|
||||
@ -121,6 +143,10 @@ namespace BlueWater
|
||||
Destroy(element.gameObject, 2f);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(_attackSfxName))
|
||||
{
|
||||
AudioManager.Instance.PlaySfx(_attackSfxName);
|
||||
}
|
||||
var impactParticle = Instantiate(ImpactParticle, transform.position, Quaternion.identity);
|
||||
// TODO : HitBox가 레이어로 설정되어있으도, 부모 객체 Player를 계속 가져오는 버그가 있음
|
||||
var iDamageable = hitCollider.GetComponentInParent<IDamageable>();
|
||||
@ -128,6 +154,22 @@ namespace BlueWater
|
||||
{
|
||||
iDamageable.TakeDamage(_attackDamage);
|
||||
OnHitAction?.Invoke();
|
||||
|
||||
if (_isSlowedMoveSpeed)
|
||||
{
|
||||
var slowable = hitCollider.GetComponentInParent<ISlowable>();
|
||||
slowable?.SlowMoveSpeed(_slowDuration, _moveSpeedCoefficient);
|
||||
}
|
||||
|
||||
if (_isPushed)
|
||||
{
|
||||
var physicMovable = hitCollider.GetComponentInParent<IPhysicMovable>();
|
||||
if (physicMovable != null)
|
||||
{
|
||||
var pushDirection = hitCollider.transform.position - transform.position;
|
||||
physicMovable.SetPush(pushDirection.normalized, _pushPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Destroy(_projectilePrefab, 3f);
|
||||
@ -161,8 +203,28 @@ namespace BlueWater
|
||||
|
||||
iDamageable.TakeDamage(_attackDamage);
|
||||
OnHitAction?.Invoke();
|
||||
|
||||
if (_isSlowedMoveSpeed)
|
||||
{
|
||||
var slowable = _hitColliders[i].GetComponentInParent<ISlowable>();
|
||||
slowable?.SlowMoveSpeed(_slowDuration, _moveSpeedCoefficient);
|
||||
}
|
||||
|
||||
if (_isPushed)
|
||||
{
|
||||
var physicMovable = _hitColliders[i].GetComponentInParent<IPhysicMovable>();
|
||||
if (physicMovable != null)
|
||||
{
|
||||
var pushDirection = _hitColliders[i].transform.position - transform.position;
|
||||
physicMovable.SetPush(pushDirection.normalized, _pushPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(_attackSfxName))
|
||||
{
|
||||
AudioManager.Instance.PlaySfx(_attackSfxName);
|
||||
}
|
||||
var impactParticle = Instantiate(ImpactParticle, transform.position, Quaternion.identity);
|
||||
|
||||
Destroy(_projectilePrefab, 3f);
|
||||
@ -181,6 +243,28 @@ namespace BlueWater
|
||||
OnHitAction = onHitAction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 파티클이 충돌할 때, 슬로우 효과를 적용할 때 사용
|
||||
/// </summary>
|
||||
/// <param name="slowDuration">슬로우 효과 지속시간</param>
|
||||
/// <param name="moveSpeedCoefficient">값이 1f일 때, 기본 이동속도\n0.3f라면, 70%감소 효과 (기존 속도의 30%)</param>
|
||||
public void SetSlowMoveSpeed(float slowDuration, float moveSpeedCoefficient)
|
||||
{
|
||||
_isSlowedMoveSpeed = true;
|
||||
_slowDuration = slowDuration;
|
||||
_moveSpeedCoefficient = moveSpeedCoefficient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 파티클이 충돌할 때, 밀어내는 효과를 적용할 때 사용
|
||||
/// </summary>
|
||||
/// <param name="pushPower">hit되는 캐릭터의 moveSpeed를 고려해서 적용</param>
|
||||
public void SetPush(float pushPower)
|
||||
{
|
||||
_isPushed = true;
|
||||
_pushPower = pushPower;
|
||||
}
|
||||
|
||||
public void AddForce(Vector3 force, ForceMode forceMode) => _rigidbody.AddForce(force, forceMode);
|
||||
}
|
||||
}
|
@ -25,5 +25,5 @@ MonoBehaviour:
|
||||
m_Bits: 67584
|
||||
<ChargeSpeed>k__BackingField: 25
|
||||
<ChargeOffset>k__BackingField: 3
|
||||
<PushPower>k__BackingField: 10
|
||||
<PushPower>k__BackingField: 12
|
||||
<StunDuration>k__BackingField: 0.05
|
||||
|
@ -24,5 +24,5 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
m_Bits: 67584
|
||||
<AttackOffset>k__BackingField: 3
|
||||
<PushPower>k__BackingField: 5
|
||||
<PushPower>k__BackingField: 10
|
||||
<StunDuration>k__BackingField: 0.05
|
||||
|
@ -29,5 +29,5 @@ MonoBehaviour:
|
||||
<ProjectileDamage>k__BackingField: 1
|
||||
<ProjectileAngle>k__BackingField: 90
|
||||
<ProjectileSpeed>k__BackingField: 10
|
||||
<PushPower>k__BackingField: 5
|
||||
<PushPower>k__BackingField: 15
|
||||
<StunDuration>k__BackingField: 0.1
|
||||
|
@ -32,6 +32,6 @@ MonoBehaviour:
|
||||
<StunColor>k__BackingField:
|
||||
serializedVersion: 2
|
||||
rgba: 4288949504
|
||||
<PushPowerCoefficient>k__BackingField: 10
|
||||
<PushPowerCoefficient>k__BackingField: 20
|
||||
<CameraShakingPower>k__BackingField: 3
|
||||
<CameraShakingDuration>k__BackingField: 1
|
||||
|
@ -30,7 +30,7 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
m_Bits: 64
|
||||
<RollSpeed>k__BackingField: 40
|
||||
<PushPower>k__BackingField: 8
|
||||
<PushPower>k__BackingField: 12
|
||||
<AirJumpForce>k__BackingField: 3
|
||||
<BounceBackForce>k__BackingField: 200
|
||||
<CameraShakingPower>k__BackingField: 5
|
||||
|
@ -28,4 +28,4 @@ MonoBehaviour:
|
||||
<JumpHeight>k__BackingField: 2
|
||||
<SlowDuration>k__BackingField: 3
|
||||
<SlowCoefficient>k__BackingField: 0.5
|
||||
<PushPower>k__BackingField: 3
|
||||
<PushPower>k__BackingField: 10
|
||||
|
@ -133,9 +133,10 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
var hitVector = raycastHit.transform.position - SkillUser.transform.position;
|
||||
hitVector.y = 0f;
|
||||
var hitDirection = hitVector.normalized;
|
||||
var cross = Vector3.Cross(hitDirection, transform.forward);
|
||||
var addForceDirection = cross.y >= 0f ? Quaternion.Euler(0, -90, 0) * transform.forward : Quaternion.Euler(0, 90, 0) * transform.forward;
|
||||
iPhysicMovable.AddForce(addForceDirection * _bullChargeData.PushPower, ForceMode.Impulse);
|
||||
iPhysicMovable.SetPush(hitDirection, _bullChargeData.PushPower);
|
||||
// var cross = Vector3.Cross(hitDirection, transform.forward);
|
||||
// var addForceDirection = cross.y >= 0f ? Quaternion.Euler(0, -90, 0) * transform.forward : Quaternion.Euler(0, 90, 0) * transform.forward;
|
||||
// iPhysicMovable.AddForce(addForceDirection * _bullChargeData.PushPower, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
totalDistanceCovered += moveDistance;
|
||||
|
@ -11,9 +11,6 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
[field: SerializeField]
|
||||
public GameObject SeismicThrustParticle { get; private set; }
|
||||
|
||||
[field: SerializeField, Tooltip("공격했을 때, 타겟을 밀어내는 힘")]
|
||||
public float PushPower { get; private set; } = 20f;
|
||||
|
||||
[field: SerializeField, Tooltip("공격했을 때, 타겟의 기절 지속시간")]
|
||||
public float StunDuration { get; private set; } = 0.15f;
|
||||
|
||||
|
@ -120,7 +120,7 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
var hitVector = hitCollider.transform.position - SkillUser.transform.position;
|
||||
hitVector.y = 0f;
|
||||
var hitDirection = hitVector.normalized;
|
||||
iPhysicMovable.AddForce(hitDirection * _hammerSlamData.PushPower, ForceMode.Impulse);
|
||||
iPhysicMovable.SetPush(hitDirection, _hammerSlamData.PushPower);
|
||||
}
|
||||
|
||||
HideIndicator();
|
||||
|
@ -130,7 +130,7 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
iStunnable?.TryStun(_meteorSwingData.StunDuration);
|
||||
|
||||
var iPhysicMovable = hitCollider.GetComponentInParent<IPhysicMovable>();
|
||||
iPhysicMovable?.AddForce(attackDirection * _meteorSwingData.PushPower, ForceMode.Impulse);
|
||||
iPhysicMovable?.SetPush(attackDirection, _meteorSwingData.PushPower);
|
||||
}
|
||||
|
||||
HideIndicator();
|
||||
|
@ -113,9 +113,6 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
|
||||
var iSlowable = raycastHit.transform.GetComponentInParent<ISlowable>();
|
||||
iSlowable?.TrySlowMoveSpeed(_seismicThrustData.SlowDuration, _seismicThrustData.SlowCoefficient);
|
||||
|
||||
var iPhysicMovable = raycastHit.transform.GetComponentInParent<IPhysicMovable>();
|
||||
iPhysicMovable?.AddForce(transform.forward * _seismicThrustData.PushPower, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
HideIndicator();
|
||||
|
@ -198,9 +198,9 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
{
|
||||
var hitCollider = HitColliders[i];
|
||||
var iStunnable = hitCollider.transform.GetComponentInParent<IStunnable>();
|
||||
if (iStunnable != null)
|
||||
if (iStunnable != null && iStunnable.CanStun())
|
||||
{
|
||||
iStunnable.TryStun(_skyFallSmashData.StunDuration);
|
||||
iStunnable.Stun(_skyFallSmashData.StunDuration);
|
||||
|
||||
var iPhysicMovable = hitCollider.GetComponentInParent<IPhysicMovable>();
|
||||
var hitVector = hitCollider.transform.position - transform.position;
|
||||
@ -210,8 +210,7 @@ namespace BlueWater.Enemies.Bosses.Rhinoceros.Skills
|
||||
var hitDistance = hitVector.magnitude;
|
||||
var powerCoefficient = stunRange - hitDistance;
|
||||
var addForcePower = powerCoefficient / stunRange * _skyFallSmashData.PushPowerCoefficient;
|
||||
|
||||
iPhysicMovable.AddForce(hitDirection * addForcePower, ForceMode.Impulse);
|
||||
iPhysicMovable.SetPush(hitDirection, addForcePower);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,5 +16,14 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
|
||||
|
||||
[field: SerializeField]
|
||||
public float ProjectileSpeed { get; private set; } = 25f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float PushPower { get; private set; } = 3.5f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float SlowDuration { get; private set; } = 3f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float MoveSpeedCoefficient { get; private set; } = 0.3f;
|
||||
}
|
||||
}
|
@ -28,5 +28,14 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
|
||||
|
||||
[field: SerializeField]
|
||||
public float ProjectileSpeed { get; private set; } = 25f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float PushPower { get; private set; } = 3.5f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float SlowDuration { get; private set; } = 3f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float MoveSpeedCoefficient { get; private set; } = 0.3f;
|
||||
}
|
||||
}
|
@ -66,6 +66,8 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
|
||||
var projectile = Instantiate(_multiThrowSpikesData.SpikePrefab, startPosition, rotation,
|
||||
_particleInstantiateLocation).GetComponent<ProjectileController>();
|
||||
projectile.Initialize(_multiThrowSpikesData.Damage, _multiThrowSpikesData.TargetLayer);
|
||||
projectile.SetPush(_multiThrowSpikesData.PushPower);
|
||||
projectile.SetSlowMoveSpeed(_multiThrowSpikesData.SlowDuration, _multiThrowSpikesData.MoveSpeedCoefficient);
|
||||
projectile.AddForce(projectile.transform.forward * _multiThrowSpikesData.ProjectileSpeed, ForceMode.Impulse);
|
||||
|
||||
yield return waitForSeconds;
|
||||
|
@ -165,11 +165,12 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
|
||||
var hitVector = hitCollider.transform.position - SkillUser.transform.position;
|
||||
hitVector.y = 0f;
|
||||
var hitDirection = hitVector.normalized;
|
||||
var cross = Vector3.Cross(hitDirection, transform.forward);
|
||||
var addForceDirection = cross.y >= 0f
|
||||
? Quaternion.Euler(0, -90, 0) * transform.forward
|
||||
: Quaternion.Euler(0, 90, 0) * transform.forward;
|
||||
iPhysicMovable.AddForce(addForceDirection * _singleRollData.PushPower, ForceMode.Impulse);
|
||||
iPhysicMovable.SetPush(hitDirection, _singleRollData.PushPower);
|
||||
// var cross = Vector3.Cross(hitDirection, transform.forward);
|
||||
// var addForceDirection = cross.y >= 0f
|
||||
// ? Quaternion.Euler(0, -90, 0) * transform.forward
|
||||
// : Quaternion.Euler(0, 90, 0) * transform.forward;
|
||||
// iPhysicMovable.AddForce(addForceDirection * _singleRollData.PushPower, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
_userRigidbody.MovePosition(skillUserPosition + targetDirection * moveDistance);
|
||||
|
@ -101,6 +101,8 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
|
||||
var spike = Instantiate(_spikeBarrageData.SpikePrefab, spikeSpawnPosition, rotation,
|
||||
_particleInstantiateLocation).GetComponent<ProjectileController>();
|
||||
spike.Initialize(_spikeBarrageData.Damage, _spikeBarrageData.TargetLayer);
|
||||
spike.SetPush(_spikeBarrageData.PushPower);
|
||||
spike.SetSlowMoveSpeed(_spikeBarrageData.SlowDuration, _spikeBarrageData.MoveSpeedCoefficient);
|
||||
spike.AddForce(spike.transform.forward * _spikeBarrageData.ProjectileSpeed, ForceMode.Impulse);
|
||||
|
||||
yield return spikeInterval;
|
||||
|
@ -262,7 +262,7 @@ namespace BlueWater.Enemies.Bosses.TitanSlime.Skills
|
||||
iSlowable?.TrySlowMoveSpeed(_jumpSlamData.SlowDuration, _jumpSlamData.SlowCoefficient);
|
||||
|
||||
var iPhysicMovable = hitCollider.GetComponentInParent<IPhysicMovable>();
|
||||
iPhysicMovable?.AddForce(targetDirection * _jumpSlamData.PushPower, ForceMode.Impulse);
|
||||
iPhysicMovable?.SetPush(targetDirection, _jumpSlamData.PushPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user