2026-05-21 버그 수정

This commit is contained in:
2026-05-21 16:02:38 +09:00
parent a4a9316e9c
commit 04d4939e88
10 changed files with 43 additions and 15 deletions

Binary file not shown.

View File

@@ -12,7 +12,6 @@ private void Awake()
{
_collider = GetComponent<Collider2D>();
_collider.isTrigger = true;
_collider.enabled = false;
}
private void OnTriggerStay2D(Collider2D other)

View File

@@ -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);

View File

@@ -0,0 +1,23 @@
using UnityEngine;
public class SkillSupport : MonoBehaviour
{
[HideInInspector] public Transform[] DownHazardFirePos; // 위에서 아래로 포격
[HideInInspector] public Transform[] RightHazardFirePos; // 왼쪽에서 오른쪽으로 포격
void Start()
{
GameObject[] shineDownStartPoss = GameObject.FindGameObjectsWithTag("ShineDownStartPos");
GameObject[] shineRightStartPoss = GameObject.FindGameObjectsWithTag("ShineRightStartPos");
DownHazardFirePos = new Transform[shineDownStartPoss.Length];
RightHazardFirePos = new Transform[shineRightStartPoss.Length];
for(int i=0;i<DownHazardFirePos.Length;i++)
DownHazardFirePos[i] = shineDownStartPoss[i].transform;
for(int i=0;i<RightHazardFirePos.Length;i++)
RightHazardFirePos[i] = shineRightStartPoss[i].transform;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: dbd0de93dbf5f0f4699171d0a909b4b5

Binary file not shown.

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2661c3fd528b72b46b2236fd0f53c4a6
guid: a9e66d0ddb9a69d45be17f4fd4cf54cc
PrefabImporter:
externalObjects: {}
userData: