2025-07-21 22:14:06 +08:00
|
|
|
export interface Dialog {
|
|
|
|
|
isPlayer: boolean;
|
|
|
|
|
content: string;
|
2025-08-27 16:12:19 +08:00
|
|
|
isLoading?: boolean;
|
2025-07-21 22:14:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class DemoData {
|
|
|
|
|
public Dialogs: Dialog[] = [];
|
|
|
|
|
|
|
|
|
|
public cleanDialog() {
|
|
|
|
|
this.Dialogs = [];
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-27 16:12:19 +08:00
|
|
|
public pushDialog(isPlayer: boolean, str: string, isLoading: boolean = false) {
|
2025-07-21 22:14:06 +08:00
|
|
|
if (!this.Dialogs) this.Dialogs = [];
|
2025-08-27 16:12:19 +08:00
|
|
|
this.Dialogs.push({ isPlayer: isPlayer, content: str, isLoading: isLoading });
|
2025-07-21 22:14:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public GetDialogs() {
|
|
|
|
|
return this.Dialogs;
|
|
|
|
|
}
|
|
|
|
|
}
|