// ============================================ // 📁 파일명: ArrowData.cs // 📂 경로: Assets/Scripts/Data/ArrowData.cs // ============================================ using UnityEngine; /// /// 화살 정보를 담는 데이터 구조체 /// ArrowPickup.GetArrowData() → PlayerAttack.SetCurrentArrow() 로 전달됩니다. /// [System.Serializable] public struct ArrowData { [Header("--- 기본 정보 ---")] public string arrowName; // 화살 이름 (UI 표시용) public ArrowElementType elementType; // 속성 타입 [Header("--- 스탯 ---")] public float baseDamage; // 기본 데미지 public float elementDamage; // 속성 추가 데미지 public float elementDuration; // 속성 지속시간 (초) [Header("--- 프리팹 ---")] public GameObject projectilePrefab; // 발사할 파티클 프리팹 /// /// 기본 화살 데이터 생성 /// public static ArrowData Default => new ArrowData { arrowName = "기본 화살", elementType = ArrowElementType.None, baseDamage = 10f, elementDamage = 0f, elementDuration = 0f, projectilePrefab = null }; public override string ToString() { return $"[{arrowName}] 속성={elementType}, " + $"기본데미지={baseDamage}, 속성데미지={elementDamage}, " + $"지속시간={elementDuration}s"; } }