using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; namespace Rokojori { // A reusable, self-contained run of blocks, authored and moved around as one // asset. Assumption pending confirmation: "blocks" is a flat linear sequence // of content nodes (DialogLine, CommentBlock, ...) - each child's own "next" // is ignored while inside the list, since ordering here is authoritative. // Once the list is exhausted, control hands off to this DialogList's "next". [CreateAssetMenu( menuName = "Rokojori/Dialog/Dialog List" )] public class DialogList : DialogBlock { public List blocks = new List(); public override async Task Run( IDialogDisplay display ) { for ( int i = 0; i < blocks.Count; i++ ) { await blocks[ i ].Run( display ); } return next; } } }