2026-05-19 무기추가

진행중인 사항 -
InputManager + .inputactions: WeaponSlot1/2/3 액션 추가, 키 1/2/3 매핑
PlayerController 통합:
Player에 PlayerWeaponInventory 컴포넌트 자동 부착
OnWeaponChanged 구독 → idle/walk State 이름 동적 교체
OnPunchInput 분기: 무장 시 weapon.AttackRootNode 사용
WeaponSlot 입력 핸들러 3개 추가 (EquipUnarmed / EquipSlot(0) / EquipSlot(1))
This commit is contained in:
2026-05-19 18:05:05 +09:00
parent de726705da
commit 4a0b07701e
35 changed files with 719 additions and 22 deletions

View File

@@ -1,6 +1,13 @@
using UnityEngine;
using UnityEngine.Serialization;
// 공격 판정 영역의 도형. Circle은 원거리 균등 판정, Box는 길쭉한 직선/넓은 부채꼴에 적합.
public enum HitShape
{
Circle,
Box
}
// ============================================================================
// ActionData
// ----------------------------------------------------------------------------
@@ -44,8 +51,10 @@ public class ActionData : ScriptableObject
// ─── 공격 판정 (HasHit=true일 때 적용) ─────────────────────────────
[Header("Hit")]
public bool HasHit = true; // 이 액션이 데미지를 주는지
public HitShape Shape = HitShape.Circle; // Circle = Radius 사용, Box = HitSize 사용
public Vector2 Offset = new Vector2(0.5f, 0f); // 캐릭터 기준 hit 영역 중심 (X는 facing 방향)
public float Radius = 0.5f; // hit 영역 반경 (AttackHitbox.CircleCollider2D)
public float Radius = 0.5f; // Circle일 때 사용하는 반경
public Vector2 HitSize = new Vector2(1f, 0.5f); // Box일 때 사용하는 가로/세로 크기
public int Damage = 10; // 데미지 양
public float HitTiming = 0.15f; // 액션 시작 후 hit 발동까지 시간 (선딜)
public float HitDuration = 0f; // hit 영역이 활성 상태로 유지되는 시간 (0이면 단발)