2026-05-21 버그 수정
This commit is contained in:
@@ -21,9 +21,8 @@ public class HazardSkill : BossSkill
|
||||
[SerializeField] private float _windup = 0.5f; // 애니 시작 ~ 피해 판정 ON
|
||||
[SerializeField] private float _activeDuration = 1.5f; // 피해 판정 유지 시간
|
||||
[SerializeField] private float _recovery = 0.6f; // 판정 OFF 후 후딜
|
||||
[SerializeField] private Transform[] _downHazardFirePos; // 위에서 아래로 포격
|
||||
[SerializeField] private Transform[] _rightHazardFirePos; // 왼쪽에서 오른쪽으로 포격
|
||||
[SerializeField] private GameObject _hazardHitboxOrigin;
|
||||
private SkillSupport support;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -31,6 +30,11 @@ private void Awake()
|
||||
_animator = GetComponentInChildren<Animator>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
support = Object.FindFirstObjectByType<SkillSupport>();
|
||||
}
|
||||
|
||||
protected override async Awaitable RunSkill(CancellationToken token)
|
||||
{
|
||||
try
|
||||
@@ -64,7 +68,7 @@ protected override async Awaitable RunSkill(CancellationToken token)
|
||||
|
||||
private void FireHazards(int dirChoice)
|
||||
{
|
||||
Transform[] _hazardPoss = dirChoice switch { 0 => _downHazardFirePos, 1=>_rightHazardFirePos, _=> null};
|
||||
Transform[] _hazardPoss = dirChoice switch { 0 => support.DownHazardFirePos, 1=> support.RightHazardFirePos, _=> null};
|
||||
Vector2 attackDir = dirChoice switch {0 => Vector2.down,1=>Vector2.right,_=>Vector2.left};
|
||||
|
||||
if (_hazardPoss == null) return;
|
||||
@@ -75,7 +79,7 @@ private void FireHazards(int dirChoice)
|
||||
Rigidbody2D hitbox_rb = hitbox.GetComponent<Rigidbody2D>();
|
||||
if(hitbox_rb != null)
|
||||
{
|
||||
hitbox_rb.linearVelocity = attackDir*5.0f;
|
||||
hitbox_rb.linearVelocity = attackDir*50.0f;
|
||||
}
|
||||
|
||||
Destroy(hitbox,5f);
|
||||
|
||||
Reference in New Issue
Block a user