using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; namespace Rokojori { [CreateAssetMenu( menuName = "Rokojori/Dialog/Player Choice" )] public class PlayerChoice : DialogBlock { public Locale choiceLine = null; public List options = new List(); public override async Task Run( IDialogDisplay display ) { var answer = await display.Show( this ); var option = options[ answer.selectedOptionIndex ]; if ( option.action != null ) { option.action.Execute(); } return option.next; } } }