This commit is contained in:
2025-09-21 14:28:17 +08:00
parent 11e8e516b7
commit d823fa9083
16 changed files with 635 additions and 701 deletions
@@ -92,18 +92,6 @@ export class ChatContentsLayout extends Component {
playerBubble.node.active = true;
playerBubble.updateBubbleContent(dialog.content, true);
this.bubbles.push(playerBubble);
// 创建等待回复气泡(插入到首位,显示在玩家消息上面)
// this.waitingBubble = this.createOrGetBubble(false);
// this.waitingBubble.node.active = true;
// this.waitingBubble.updateBubbleContent("...", false, undefined, true);
// this.waitingBubble.node.setSiblingIndex(0);
// this.bubbles.push(this.waitingBubble);
this.node.position = Vec3.ZERO;
// 滚动到底部(等待下一帧Layout更新完成)
this.scheduleOnce(() => {
this.scrollView.scrollToBottom();
}, 0);
}
/**
* 更新AI回复的对话
@@ -120,6 +108,12 @@ export class ChatContentsLayout extends Component {
// 逐个添加AI对话,带延时
this.addAIDialogsWithDelay(dialogs, 0);
this.node.position = Vec3.ZERO;
// 滚动到底部(等待下一帧Layout更新完成)
this.scheduleOnce(() => {
this.scrollView.scrollToBottom();
}, 0);
}
/**