Merge remote master

This commit is contained in:
2026-03-09 18:08:46 +08:00
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;
@@ -847,7 +848,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() {