public SceneDirector( CoroutineRunner coroutineRunner, AvailableScenes availableScenes, Fader fader, IPlayerChoiceService playerChoiceService) { this.coroutineRunner = coroutineRunner; this.availableScenes = availableScenes; this.fader = fader; this.playerChoiceService = playerChoiceService; }
public static IEnumerable <T> FilterForPreconditions <T>( this IEnumerable <T> enumerable, IPlayerChoiceService playerChoiceService, Func <T, List <DialogItem.Precondition> > preconditionListGetter) { return(enumerable.Where( item => { foreach (var precondition in preconditionListGetter(item)) { if (playerChoiceService.GetChoice( precondition.choice, precondition.assumedChoiceValue) != precondition.choiceValue) { return false; } } return true; })); }