EerieVillage/Assets/Scripts/Skills/Events/SkillFireEvent.cs

52 lines
2.0 KiB
C#
Raw Normal View History

docs(BT12-Dev Phase 2-A): Skills 13 파일 신규 (인터페이스·SO·중앙 컴포넌트) C49 Phase 2 (집행) — Sonnet 위임 결과·Phase 1 dev-team-lead 재분석 보고서 정합. 신설 13 파일 (Assets/Scripts/Skills/): - Interfaces/ (4): ISkillRuntime, IActiveSkill, IPassiveSkill, IAwakeningSkill (+ ActiveTrigger·PassiveTriggerKind·AwakeningPattern enum) - Data/ (4): SkillDataAsset (abstract·AttributeTag·TypeTag), ActiveSkillData (Category 6종·14 신규 필드), PassiveSkillData (StatType·stub), AwakeningSkillData (stub) - Runtime/ (4): PlayerStats (POCO·AttributeTag Dictionary), ActiveSkillRuntime (Tick·Fire·EffectiveCooldown 하드캡 0.5s·StackLevelFactor), PlayerSkillInventory ([RequireComponent(Health)]·OnDamagedEvent 구독·NotifyEnemyKilled), SkillRuntimeFactory (Resolve·Create·stub 2종) - Events/ (1): SkillFireEvent (Simulation.Event<T>·Execute stub·카테고리 분기 6종 주석) 설계서 정합: - §2-1 인터페이스 계약 (ISkillRuntime → IActiveSkill·IPassiveSkill·IAwakeningSkill) - §2-2 ScriptableObject 계약 (ActiveCategory 6종·CreateAssetMenu 3종) - §2-3 PlayerStats POCO·AttributeTag 키 Dictionary - §3-2 CSV 매핑 테이블·§3-3 Resolve+Create 분기 - §4-2 EffectiveCooldown = BaseCooldown × CooldownMultiplier ÷ StackLevelFactor·하드캡 0.5s - §4-4 OnHit·OnKill 이벤트 핸들러 PlayerSkillInventory 구현 설계서 대비 조정 3건 (Sonnet 자체 정합): 1. IPassiveSkill.ApplyTo → ApplyModifier·RemoveModifier (설계서 §2-1 명세 정합) 2. AddSkillByCardId 반환 void → bool (실패 감지) 3. EnemyKillContext struct 신설 (Phase 2-D 정식 통합 전 decoupling) Phase 2-B 준비: - SkillFireEvent.Execute stub 영역 카테고리 분기 6종 주석 - Phase 2-B 투사체 진입 시 ProjectileSpawner·AttackHitbox 연결 지점 명확 기존 파일 영역 변경 X (BT12-MVP-A·BT5-Dev·BT7-Dev 미변경) 회귀 위험 = 매우 낮음 (신규 파일만) C50 분량 (PD 사전 승인 80~120K) — 실제 ~73K (정합) PD 결정 (b 5분할·b-1 카테고리 6분할·우선 투사체) 사전 승인 정합 pm-auditor 사전 감사 = Pass 4 + Minor 1 + Major 1 - Major 1 정정 영역 = git add 명시 path 한정 (Skills 디렉토리만·Screenshots·_Recovery 미포함) ✅ - Minor 1 후속 영역 = PD Editor Refresh 후 read_console 본 PM 직접 실측 untracked 영역 별도 안건: - Assets/Screenshots/ (manage_camera screenshot 영역·.gitignore 검토 영역) - Assets/_Recovery/ (Unity 자동 복구 파일·.gitignore 검토 영역)
2026-05-09 09:31:38 +00:00
using Platformer.Core;
namespace EerieVillage.Skills
{
/// <summary>
/// 스킬 발동 이벤트. Simulation.Event&lt;T&gt; 계승.
/// ActiveSkillRuntime.Fire()에서 Simulation.Schedule&lt;SkillFireEvent&gt;() 호출.
/// BT12-Dev v1 §3-4 정합.
///
/// Phase 2-A: Execute = stub (카테고리 분기 구조만 명시).
/// Phase 2-B: 카테고리별 실 발동기 (ProjectileSpawner·AttackHitbox 등) 연결 예정.
/// </summary>
public class SkillFireEvent : Simulation.Event<SkillFireEvent>
{
/// <summary>발동 요청한 액티브 스킬 런타임</summary>
public ActiveSkillRuntime Runtime;
/// <summary>플레이어 스킬 인벤토리 (Stats·위치·방향 조회 경로)</summary>
public PlayerSkillInventory Inventory;
public override void Execute()
{
if (Runtime == null) return;
// Phase 2-B 카테고리별 실 발동기 호출 예정 영역
// 현재 Phase 2-A = 구조 stub만 배치.
//
// switch (Runtime.ActiveData.Category)
// {
// case ActiveCategory.Projectile:
// ProjectileSpawner.Spawn(Runtime, Inventory); break;
// case ActiveCategory.MeleeArea:
// AttackHitbox.Fire(Runtime, Inventory); break;
// case ActiveCategory.PlacementPersistent:
// AuraZone.Place(Runtime, Inventory); break;
// case ActiveCategory.Minion:
// MinionSpawner.Spawn(Runtime, Inventory); break;
// case ActiveCategory.Debuff:
// DebuffApplier.Apply(Runtime, Inventory); break;
// case ActiveCategory.SpecialJudge:
// SpecialJudgeHandler.Execute(Runtime, Inventory); break;
// }
}
internal override void Cleanup()
{
Runtime = null;
Inventory = null;
}
}
}