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

32 lines
614 B
C#
Raw Permalink Normal View History

2026-09-25 20:32:02 +00:00
using System.Threading.Tasks;
namespace Rokojori
{
// Standalone cursor engine - knows nothing about DialogManager, UI, or the
// simulation loop. Only ever talks to the display it was given.
public class DialogProcessor
{
public IDialogDisplay _display = null;
public static DialogProcessor Create( IDialogDisplay display )
{
var processor = new DialogProcessor();
processor._display = display;
return processor;
}
public async Task Run( DialogBlock start )
{
var current = start;
while ( current != null )
{
current = await current.Run( _display );
}
}
}
}