fix(notification): Act 완료 토스트 메시지 인덱싱 버그 수정
- plotStageCount 인덱싱 오류 수정 (plotStageCount - 1 → -2) - 프롤로그 완료 시 "PROLOGUE COMPLETE!" 표시되도록 수정 - showActComplete(0)이 프롤로그 완료를 올바르게 처리
This commit is contained in:
@@ -77,10 +77,14 @@ class NotificationService {
|
||||
}
|
||||
|
||||
/// 막 완료 알림 (Act Complete)
|
||||
/// actNumber: 0=프롤로그, 1=Act I, 2=Act II, ...
|
||||
void showActComplete(int actNumber) {
|
||||
final title = actNumber == 0
|
||||
? 'PROLOGUE COMPLETE!'
|
||||
: 'ACT $actNumber COMPLETE!';
|
||||
show(GameNotification(
|
||||
type: NotificationType.actComplete,
|
||||
title: 'ACT $actNumber COMPLETE!',
|
||||
title: title,
|
||||
duration: const Duration(seconds: 3),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -105,10 +105,12 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
_lastQuestCount = state.progress.questCount;
|
||||
|
||||
// Act 완료 감지 (plotStageCount 증가)
|
||||
// plotStageCount: 1=프롤로그 진행, 2=프롤로그 완료, 3=Act1 완료...
|
||||
// 완료된 스테이지 인덱스 = plotStageCount - 2 (0=프롤로그, 1=Act1, ...)
|
||||
if (state.progress.plotStageCount > _lastPlotStageCount &&
|
||||
_lastPlotStageCount > 0) {
|
||||
_specialAnimation = AsciiAnimationType.actComplete;
|
||||
_notificationService.showActComplete(state.progress.plotStageCount - 1);
|
||||
_notificationService.showActComplete(state.progress.plotStageCount - 2);
|
||||
_resetSpecialAnimationAfterFrame();
|
||||
}
|
||||
_lastPlotStageCount = state.progress.plotStageCount;
|
||||
|
||||
Reference in New Issue
Block a user