fix(animation): 전투 애니메이션 페이즈 흐름 개선

- 공격 시 prepare 페이즈부터 시작하여 준비 동작 표시
- 이펙트 레이어를 prepare 페이즈에서도 표시
- 공격자 타입을 idle 페이즈 진입 시에만 리셋
- 공격 사이클(prepare→attack→hit→recover) 동안 공격자 유지
This commit is contained in:
JiWoong Sul
2025-12-26 19:18:06 +09:00
parent d23a51466e
commit fba2f2a4cd
2 changed files with 15 additions and 10 deletions

View File

@@ -50,8 +50,10 @@ class CanvasBattleComposer {
_createMonsterLayer(phase, subFrame, attacker), _createMonsterLayer(phase, subFrame, attacker),
]; ];
// 이펙트 레이어 (공격/히트 페이즈에서, 공격자 있을 때) // 이펙트 레이어 (준비/공격/히트 페이즈에서, 공격자 있을 때)
if ((phase == BattlePhase.attack || phase == BattlePhase.hit) && if ((phase == BattlePhase.prepare ||
phase == BattlePhase.attack ||
phase == BattlePhase.hit) &&
attacker != AttackerType.none) { attacker != AttackerType.none) {
final effectLayer = _createEffectLayer(phase, subFrame, attacker); final effectLayer = _createEffectLayer(phase, subFrame, attacker);
if (effectLayer != null) { if (effectLayer != null) {

View File

@@ -211,26 +211,26 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
isParry, isParry,
isSkill, isSkill,
) = switch (event.type) { ) = switch (event.type) {
// 플레이어 공격 → attack 페이즈 // 플레이어 공격 → prepare 페이즈부터 시작 (준비 동작 표시)
CombatEventType.playerAttack => ( CombatEventType.playerAttack => (
BattlePhase.attack, BattlePhase.prepare,
event.isCritical, event.isCritical,
false, false,
false, false,
false, false,
), ),
// 스킬 사용 → attack 페이즈 + 스킬 이펙트 // 스킬 사용 → prepare 페이즈부터 시작 + 스킬 이펙트
CombatEventType.playerSkill => ( CombatEventType.playerSkill => (
BattlePhase.attack, BattlePhase.prepare,
event.isCritical, event.isCritical,
false, false,
false, false,
true, true,
), ),
// 몬스터 공격 → hit 페이즈 // 몬스터 공격 → prepare 페이즈부터 시작
CombatEventType.monsterAttack => ( CombatEventType.monsterAttack => (
BattlePhase.hit, BattlePhase.prepare,
false, false,
false, false,
false, false,
@@ -476,8 +476,11 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
_showSkillEffect = false; _showSkillEffect = false;
// 이벤트 기반 페이즈 종료 // 이벤트 기반 페이즈 종료
_isEventDrivenPhase = false; _isEventDrivenPhase = false;
// 공격자 타입 리셋 (Phase 7) // 공격자 타입 리셋 (idle 페이즈 진입 시에만)
// 공격 사이클(prepare→attack→hit→recover) 동안 유지
if (_battlePhaseSequence[_phaseIndex].$1 == BattlePhase.idle) {
_currentAttacker = AttackerType.none; _currentAttacker = AttackerType.none;
}
} else { } else {
_battleSubFrame++; _battleSubFrame++;
} }