feat(animation): 공격자별 위치 분리 및 이펙트 추가

- AttackerType enum 추가 (none, player, monster, both)
- 플레이어 공격 시에만 캐릭터 이동 (Phase 7)
- 몬스터 공격 시에만 몬스터 이동 (Phase 7)
- 몬스터 공격 이펙트 추가 (← 방향, Phase 8)
- AsciiAnimationCard에서 공격자 타입 전달
This commit is contained in:
JiWoong Sul
2025-12-26 18:35:43 +09:00
parent 6e56420a07
commit d23a51466e
3 changed files with 134 additions and 32 deletions

View File

@@ -132,6 +132,9 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
int _eventDrivenPhaseFrames = 0;
bool _isEventDrivenPhase = false;
// 공격자 타입 (Phase 7: 공격자별 위치 분리)
AttackerType _currentAttacker = AttackerType.none;
// 특수 애니메이션 프레임 수는 ascii_animation_type.dart의
// specialAnimationFrameCounts 상수 사용
@@ -331,6 +334,14 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
} else {
_isEventDrivenPhase = false;
}
// 공격자 타입 결정 (Phase 7: 공격자별 위치 분리)
_currentAttacker = switch (event.type) {
CombatEventType.playerAttack ||
CombatEventType.playerSkill => AttackerType.player,
CombatEventType.monsterAttack => AttackerType.monster,
_ => AttackerType.none,
};
});
}
@@ -465,6 +476,8 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
_showSkillEffect = false;
// 이벤트 기반 페이즈 종료
_isEventDrivenPhase = false;
// 공격자 타입 리셋 (Phase 7)
_currentAttacker = AttackerType.none;
} else {
_battleSubFrame++;
}
@@ -488,6 +501,7 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
widget.monsterBaseName,
_environment,
_globalTick,
attacker: _currentAttacker,
) ??
[AsciiLayer.empty()],
AnimationMode.walking =>