Files
Colosseum/Assets/_Game/Scripts/Skills/PlayerLoadoutPreset.cs
dal4segno 24b284ad7e feat: 젬 테스트 경로 및 보스 기절 디버그 추가
- 다중 젬 슬롯용 타입을 별도 스크립트로 분리하고 테스트 젬/로드아웃 자산 생성 경로를 정리

- 젬 테스트 전용 공격 스킬과 분리된 애니메이션 자산을 추가해 베이스 스킬 검증 경로를 마련

- PlayerSkillDebugMenu와 MPP 디버그 메뉴를 보강해 젬 프리셋 적용, 원격 테스트, 보스 기절 디버그 메뉴를 추가

- BossCombatBehaviorContext와 공통 BT 액션이 기절 상태를 존중하도록 수정해 보스 추적과 패턴 실행을 중단

- Unity 리프레시와 외부 빌드 통과를 확인하고 드로그전 및 MPP 기준 젬 프리셋 적용 흐름을 검증
2026-03-25 18:38:12 +09:00

70 lines
2.0 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace Colosseum.Skills
{
/// <summary>
/// 플레이어가 슬롯별로 사용할 스킬/젬 조합 프리셋입니다.
/// </summary>
[CreateAssetMenu(fileName = "NewPlayerLoadoutPreset", menuName = "Colosseum/Player Loadout Preset")]
public class PlayerLoadoutPreset : ScriptableObject
{
private const int DefaultSlotCount = 7;
[Header("기본 정보")]
[SerializeField] private string presetName;
[TextArea(2, 4)]
[SerializeField] private string description;
[Header("슬롯 구성")]
[SerializeField] private SkillLoadoutEntry[] slots = new SkillLoadoutEntry[DefaultSlotCount];
public string PresetName => presetName;
public string Description => description;
public IReadOnlyList<SkillLoadoutEntry> Slots => slots;
private void OnValidate()
{
EnsureSlotCapacity();
}
public void EnsureSlotCapacity(int slotCount = DefaultSlotCount)
{
slotCount = Mathf.Max(0, slotCount);
if (slots != null && slots.Length == slotCount)
{
EnsureGemSlots();
return;
}
SkillLoadoutEntry[] resized = new SkillLoadoutEntry[slotCount];
if (slots != null)
{
int copyCount = Mathf.Min(slots.Length, resized.Length);
for (int i = 0; i < copyCount; i++)
{
resized[i] = slots[i];
}
}
slots = resized;
EnsureGemSlots();
}
private void EnsureGemSlots()
{
if (slots == null)
return;
for (int i = 0; i < slots.Length; i++)
{
if (slots[i] == null)
slots[i] = new SkillLoadoutEntry();
slots[i].EnsureGemSlotCapacity();
}
}
}
}