引入属性、伤害管线
This commit is contained in:
@@ -42,7 +42,7 @@ namespace SepCore.Entity
|
||||
_attackCenter = _target != null ? _target.CachedTransform.position : CachedTransform.position;
|
||||
CachedTransform.SetParent(null);
|
||||
|
||||
Vector3 targetPos = CachedTransform.position + CachedTransform.forward * WeaponData.AttackRange;
|
||||
Vector3 targetPos = CachedTransform.position + CachedTransform.forward * CurrentAttackRange;
|
||||
_attackSequence = DOTween.Sequence();
|
||||
_attackSequence.Append(CachedTransform.DOMove(targetPos, _attackDuration).SetEase(Ease.OutQuad));
|
||||
_attackSequence.AppendCallback(() =>
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ namespace SepCore.Entity
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
_weapon.ResetAttackCooldown(_weapon.WeaponData.Cooldown);
|
||||
_weapon.ResetAttackCooldown(_weapon.CurrentCooldown);
|
||||
_weapon.Attack();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user