unity-roject-test/Assets/Scripts/Rokojori/Dialog/DialogManager.cs

30 lines
901 B
C#
Raw Permalink Normal View History

2026-09-25 20:32:02 +00:00
using System;
using System.Threading.Tasks;
using UnityEngine;
namespace Rokojori
{
// The UI-facing singleton and the only entry point for running a dialog.
// Can be called directly (menus, cutscenes, ...) or from a DialogPhase.
public class DialogManager : MonoBehaviour, IDialogDisplay
{
public static DialogManager instance => Unique<DialogManager>.Get();
public async Task StartDialog( DialogBlock start )
{
var processor = DialogProcessor.Create( this );
await processor.Run( start );
}
// Called by DialogProcessor when a block needs to be shown. UI wiring
// (text, portraits, choice buttons) isn't built yet - Assets/UI is still
// empty - so this intentionally fails loudly instead of pretending to work.
public Task<DialogAnswer> Show( DialogBlock block )
{
throw new NotImplementedException( "DialogManager UI wiring is not implemented yet." );
}
}
}