Files
asciinevrdie/lib/src/core/animation/background_data.dart
JiWoong Sul e7fb8a4adb feat(ui): 일시 정지 버튼 추가 및 배속 버그 수정
- 게임 중 일시 정지/재개 버튼 추가 (테마 버튼 옆)
- 5x 배속이 2x와 동일하게 작동하던 버그 수정
  - progress_service.dart clamp 제한을 100ms에서 500ms로 확장
- ASCII 애니메이션 40x8 규격 통일
  - townAnimation, walkingAnimation, levelUpAnimation 등 8줄로 통일
  - 레거시 애니메이션 TextAlign.left로 정렬 문제 수정
- 캐릭터 프레임 구조 통일 (머리/몸통/다리 3줄)
- 몬스터 크기 enum 실제 프레임 줄 수와 일치하도록 수정
2025-12-15 17:07:00 +09:00

179 lines
4.6 KiB
Dart

// 환경별 배경 패턴 데이터
// 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,
),
];