fix(animation): ASCII 애니메이션 높낮이/공백 문제 수정

- walkingAnimation, townAnimation 4줄 → 3줄 통일
- character_frames.dart 모든 프레임 폭 6자로 통일
- _compose() 이펙트 Y 위치 동적 계산 (하드코딩 제거)
- withShield() 3줄 캐릭터용으로 수정 (index 3 → index 1)
- BattleComposer 캔버스 시스템 및 배경 합성 추가
- 무기 카테고리별 이펙트, 몬스터 크기/색상 시스템 구현
This commit is contained in:
JiWoong Sul
2025-12-13 18:22:50 +09:00
parent e30177e788
commit 598c25e4c9
14 changed files with 2052 additions and 355 deletions

View File

@@ -0,0 +1,178 @@
// 환경별 배경 패턴 데이터
// ASCII Patrol 스타일 - 패럴렉스 스크롤링 배경
import 'package:askiineverdie/src/core/animation/background_layer.dart';
/// 환경별 배경 레이어 반환
List<BackgroundLayer> getBackgroundLayers(EnvironmentType environment) {
return switch (environment) {
EnvironmentType.town => _townLayers,
EnvironmentType.forest => _forestLayers,
EnvironmentType.cave => _caveLayers,
EnvironmentType.dungeon => _dungeonLayers,
EnvironmentType.tech => _techLayers,
EnvironmentType.void_ => _voidLayers,
};
}
// ============================================================================
// 마을 (Town) - 건물 실루엣
// ============================================================================
const _townLayers = [
// 원경 - 하늘/별
BackgroundLayer(
lines: [r'. * . * . * . * . * . * '],
scrollSpeed: 0.05,
yStart: 0,
),
// 중경 - 건물 실루엣
BackgroundLayer(
lines: [
r' _|__|_ _|__|_ _|__|_ ',
r' | | | | | | ',
],
scrollSpeed: 0.15,
yStart: 1,
),
// 전경 - 바닥
BackgroundLayer(
lines: [r'====[]====[]====[]====[]====[]====[]'],
scrollSpeed: 0.3,
yStart: 7,
),
];
// ============================================================================
// 숲 (Forest) - 나무
// ============================================================================
const _forestLayers = [
// 원경 - 하늘/별
BackgroundLayer(
lines: [r'. * . * . * . * . * '],
scrollSpeed: 0.05,
yStart: 0,
),
// 중경 - 나무 실루엣
BackgroundLayer(
lines: [
r' ,@@@, ,@@, ,@@@',
r' @@ @@ @@ @@ @@ ',
],
scrollSpeed: 0.15,
yStart: 1,
),
// 전경 - 풀/바닥
BackgroundLayer(
lines: [r'____||____||____||____||____||____||'],
scrollSpeed: 0.3,
yStart: 7,
),
];
// ============================================================================
// 동굴 (Cave) - 바위
// ============================================================================
const _caveLayers = [
// 천장
BackgroundLayer(
lines: [r'vvVVvvVVvvVVvvVVvvVVvvVVvvVVvvVVvvVV'],
scrollSpeed: 0.1,
yStart: 0,
),
// 종유석
BackgroundLayer(
lines: [
r' | V | V | ',
r' V V V ',
],
scrollSpeed: 0.15,
yStart: 1,
),
// 바닥 - 석순
BackgroundLayer(
lines: [r'^__/\__^__/\__^__/\__^__/\__^__/\__^'],
scrollSpeed: 0.25,
yStart: 7,
),
];
// ============================================================================
// 던전 (Dungeon) - 벽돌
// ============================================================================
const _dungeonLayers = [
// 천장 - 벽돌
BackgroundLayer(
lines: [r'####|####|####|####|####|####|####|#'],
scrollSpeed: 0.1,
yStart: 0,
),
// 횃불
BackgroundLayer(
lines: [
r' * * * ',
r' )| )| )| ',
],
scrollSpeed: 0.15,
yStart: 1,
),
// 바닥 - 타일
BackgroundLayer(
lines: [r'====[]====[]====[]====[]====[]====[]'],
scrollSpeed: 0.25,
yStart: 7,
),
];
// ============================================================================
// 기술 (Tech) - 회로
// ============================================================================
const _techLayers = [
// 상단 - 회로
BackgroundLayer(
lines: [r'-+-+-+-||-+-+-+-||-+-+-+-||-+-+-+-||'],
scrollSpeed: 0.1,
yStart: 0,
),
// 데이터 스트림
BackgroundLayer(
lines: [
r' 10110 01101 10110 01101 101',
r' 01 10 01 10 ',
],
scrollSpeed: 0.2,
yStart: 2,
),
// 바닥 - 패널
BackgroundLayer(
lines: [r'[====][====][====][====][====][====]'],
scrollSpeed: 0.3,
yStart: 7,
),
];
// ============================================================================
// 보이드 (Void) - 별/공허
// ============================================================================
const _voidLayers = [
// 별
BackgroundLayer(
lines: [r' * . * . * . * . * '],
scrollSpeed: 0.03,
yStart: 0,
),
// 은하
BackgroundLayer(
lines: [
r' ~*~ ~*~ ~*~ ',
r' *~ ~* *~ ~* *~ ~*',
],
scrollSpeed: 0.08,
yStart: 2,
),
// 심연
BackgroundLayer(
lines: [r'~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.'],
scrollSpeed: 0.15,
yStart: 7,
),
];