refactor(animation): Canvas 레이어 z-index 정리 및 애니메이션 개선

- 캐릭터 z=2, 몬스터 z=1, 이펙트 z=3으로 레이어 순서 정리
- walking composer 업데이트
- 게임 화면 및 애니메이션 카드 개선
This commit is contained in:
JiWoong Sul
2025-12-22 16:08:10 +09:00
parent 012d4dafd2
commit f606fca063
5 changed files with 44 additions and 40 deletions

View File

@@ -476,8 +476,11 @@ class _GamePlayScreenState extends State<GamePlayScreen>
_specialAnimation = AsciiAnimationType.resurrection;
});
// 3. 애니메이션 종료 후 게임 재개 (5프레임 × 600ms = 3초)
Future.delayed(const Duration(milliseconds: 3000), () async {
// 3. 애니메이션 종료 후 게임 재개
final duration = getSpecialAnimationDuration(
AsciiAnimationType.resurrection,
);
Future.delayed(Duration(milliseconds: duration), () async {
if (mounted) {
setState(() {
_specialAnimation = null;

View File

@@ -118,13 +118,8 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
int? _lastEventTimestamp;
bool _showCriticalEffect = false;
// 특수 애니메이션 프레임 수
static const _specialAnimationFrameCounts = {
AsciiAnimationType.levelUp: 5,
AsciiAnimationType.questComplete: 4,
AsciiAnimationType.actComplete: 4,
AsciiAnimationType.resurrection: 5,
};
// 특수 애니메이션 프레임 수는 ascii_animation_type.dart의
// specialAnimationFrameCounts 상수 사용
@override
void initState() {
@@ -242,7 +237,7 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
if (_animationMode == AnimationMode.special) {
_currentFrame++;
final maxFrames =
_specialAnimationFrameCounts[_currentSpecialAnimation] ?? 5;
specialAnimationFrameCounts[_currentSpecialAnimation] ?? 5;
// 마지막 프레임에 도달하면 특수 애니메이션 종료
if (_currentFrame >= maxFrames) {
_currentSpecialAnimation = null;