public IEnumerator Run(InteractionEntryPoint.EntryPointType entryPointType, Interactable source)
    {
        this.source = source;
        var entryPoint = nodes.FirstOrDefault(node => node is InteractionEntryPoint _entryPoint && _entryPoint.entryPointType == entryPointType) as InteractionEntryPoint;

        if (entryPoint != null)
        {
            yield return(entryPoint.Run(source));
        }
    }
Beispiel #2
0
    private IEnumerator InteractionCoroutine(InteractionEntryPoint.EntryPointType entryPointType)
    {
        if (Interactions == null)
        {
            yield break;
        }
        StartInteraction();
        yield return(Interactions.Run(entryPointType, this));

        EndInteraction();
    }