feat: 完善AI改写草稿箱功能 - 修复重头游玩、评分、数据刷新等问题

This commit is contained in:
wangwuww111
2026-03-09 14:15:00 +08:00
parent bbdccfa843
commit 18db6a8cc6
17 changed files with 1385 additions and 99 deletions

View File

@@ -8,6 +8,7 @@ export default class EndingScene extends BaseScene {
super(main, params);
this.storyId = params.storyId;
this.ending = params.ending;
this.draftId = params.draftId || null; // 保存草稿ID
console.log('EndingScene 接收到的结局:', JSON.stringify(this.ending));
this.showButtons = false;
this.fadeIn = 0;
@@ -844,7 +845,16 @@ export default class EndingScene extends BaseScene {
handleReplay() {
this.main.storyManager.resetStory();
this.main.sceneManager.switchScene('story', { storyId: this.storyId });
// 如果是从草稿进入的,重头游玩时保留草稿上下文
if (this.draftId) {
this.main.sceneManager.switchScene('story', {
storyId: this.storyId,
draftId: this.draftId
});
} else {
this.main.sceneManager.switchScene('story', { storyId: this.storyId });
}
}
handleLike() {