feat: 完善AI改写草稿箱功能 - 修复重头游玩、评分、数据刷新等问题
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user